diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 7cce43d..d014bd3 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,8 +1,9 @@ name: Documentation on: - push: - branches: - - main + workflow_run: + workflows: ['Testing'] + types: [completed] + branches: ["main"] permissions: contents: write jobs: @@ -20,10 +21,10 @@ jobs: uses: actions/setup-python@v5 with: python-version: "3.11" - cache: 'poetry' # caching pip dependencies + cache: 'poetry' - name: Install dependencies run: poetry install --with docs - - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV # (3)! + - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV - name: Setting up Cache uses: actions/cache@v4 with: @@ -31,5 +32,10 @@ jobs: path: .ci-cache restore-keys: | mkdocs-material- + - name: Download a single artifact + uses: actions/download-artifact@v4 + with: + name: coverage-report + path: docs/coverage.html - name: Deploy run: poetry run mkdocs gh-deploy --force \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ba93f42..5d7befd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,10 +17,15 @@ jobs: uses: actions/setup-python@v5 with: python-version: "3.11" - cache: 'poetry' # caching pip dependencies + cache: 'poetry' - name: Install dependencies run: poetry install --with dev - name: Test with pytest run: | poetry run coverage run -m pytest poetry run coverage report -m + - name: Share coverage report + uses: actions/upload-artifact@v4 + with: + name: coverage-report + path: htmlcov/index.html \ No newline at end of file