From 94df1d6f654bc8f5640355899b60f5153501bf10 Mon Sep 17 00:00:00 2001 From: David Ochoa Date: Tue, 12 Dec 2023 22:12:23 +0000 Subject: [PATCH] refactor: order of steps --- .github/workflows/release.yaml | 62 +++++++++++++++++----------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 94e7426c4..2f35e8339 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -6,38 +6,7 @@ on: - main jobs: - Documentation: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: 3.10.8 - - name: Install and configure Poetry - uses: snok/install-poetry@v1 - with: - virtualenvs-create: true - virtualenvs-in-project: true - installer-parallel: true - - name: Load cached venv - id: cached-poetry-dependencies - uses: actions/cache@v3 - with: - path: .venv - key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} - - name: Install dependencies - if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' - run: poetry install --no-interaction --no-root - - name: Install library - run: poetry install --without tests --no-interaction - - name: Publish docs - run: poetry run mkdocs gh-deploy --force - Release: - needs: Documentation if: github.event_name == 'push' && github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, 'chore(release):') runs-on: ubuntu-latest concurrency: release @@ -70,3 +39,34 @@ jobs: env: GH_TOKEN: ${{secrets.OTG_ETL_RELEASE}} # PyPI_TOKEN: ${{secrets.PyPI_TOKEN}} + + Documentation: + needs: Release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: 3.10.8 + - name: Install and configure Poetry + uses: snok/install-poetry@v1 + with: + virtualenvs-create: true + virtualenvs-in-project: true + installer-parallel: true + - name: Load cached venv + id: cached-poetry-dependencies + uses: actions/cache@v3 + with: + path: .venv + key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} + - name: Install dependencies + if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' + run: poetry install --no-interaction --no-root + - name: Install library + run: poetry install --without tests --no-interaction + - name: Publish docs + run: poetry run mkdocs gh-deploy --force