From 32e84dcd1596c09dff9cc0963d8cea126e2a9813 Mon Sep 17 00:00:00 2001 From: Vlada Dusek Date: Wed, 25 Nov 2026 14:53:09 +0100 Subject: [PATCH 1/3] ci: align release workflows with crawlee-python --- .github/workflows/manual_release_beta.yaml | 6 +++--- .github/workflows/manual_release_docs.yaml | 16 +++++++++++++++- .github/workflows/manual_release_stable.yaml | 6 +++--- .github/workflows/manual_version_docs.yaml | 2 +- .../workflows/on_schedule_regenerate_models.yaml | 2 +- 5 files changed, 23 insertions(+), 9 deletions(-) diff --git a/.github/workflows/manual_release_beta.yaml b/.github/workflows/manual_release_beta.yaml index e60f2f09..289478f6 100644 --- a/.github/workflows/manual_release_beta.yaml +++ b/.github/workflows/manual_release_beta.yaml @@ -32,7 +32,7 @@ jobs: runs-on: ubuntu-latest outputs: version_number: ${{ steps.release_prepare.outputs.version_number }} - changelog: ${{ steps.release_prepare.outputs.changelog }} + changelog_artifact_name: ${{ steps.release_prepare.outputs.changelog_artifact_name }} steps: - uses: apify/actions/git-cliff-release@v1.9.0 id: release_prepare @@ -46,7 +46,7 @@ jobs: needs: [release_prepare] runs-on: ubuntu-latest environment: - name: pypi + name: automation deployment: false permissions: contents: write @@ -58,7 +58,7 @@ jobs: uses: apify/actions/python-bump-and-update-changelog@v1.9.0 with: version-number: ${{ needs.release_prepare.outputs.version_number }} - changelog: ${{ needs.release_prepare.outputs.changelog }} + changelog-artifact-name: ${{ needs.release_prepare.outputs.changelog_artifact_name }} apify-service-account-github-token: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }} # Publishing runs as a separate workflow run of `publish_to_pypi.yaml` (see the comment there). diff --git a/.github/workflows/manual_release_docs.yaml b/.github/workflows/manual_release_docs.yaml index 0bbf468b..820390ee 100644 --- a/.github/workflows/manual_release_docs.yaml +++ b/.github/workflows/manual_release_docs.yaml @@ -34,6 +34,10 @@ env: jobs: build_docs: name: Build docs + # Holds only the docs build tokens, so the docs toolchain never runs where the service account token is available. + environment: + name: docs + deployment: false permissions: contents: read checks: read @@ -132,7 +136,7 @@ jobs: contents: read runs-on: ubuntu-latest environment: - name: github-pages + name: automation deployment: false steps: @@ -180,6 +184,16 @@ jobs: - name: Deploy artifact to GitHub Pages uses: actions/deploy-pages@v5.0.1 + invalidate_cloudfront_cache: + name: Invalidate CloudFront cache + needs: [deploy_docs] + environment: + name: automation + deployment: false + permissions: {} + runs-on: ubuntu-latest + + steps: - name: Invalidate CloudFront cache run: | gh workflow run invalidate-cloudfront.yml \ diff --git a/.github/workflows/manual_release_stable.yaml b/.github/workflows/manual_release_stable.yaml index f08c5499..9a355708 100644 --- a/.github/workflows/manual_release_stable.yaml +++ b/.github/workflows/manual_release_stable.yaml @@ -49,7 +49,7 @@ jobs: outputs: version_number: ${{ steps.release_prepare.outputs.version_number }} tag_name: ${{ steps.release_prepare.outputs.tag_name }} - changelog: ${{ steps.release_prepare.outputs.changelog }} + changelog_artifact_name: ${{ steps.release_prepare.outputs.changelog_artifact_name }} release_notes: ${{ steps.release_prepare.outputs.release_notes }} steps: - uses: apify/actions/git-cliff-release@v1.9.0 @@ -65,7 +65,7 @@ jobs: needs: [release_prepare] runs-on: ubuntu-latest environment: - name: pypi + name: automation deployment: false permissions: contents: write @@ -77,7 +77,7 @@ jobs: uses: apify/actions/python-bump-and-update-changelog@v1.9.0 with: version-number: ${{ needs.release_prepare.outputs.version_number }} - changelog: ${{ needs.release_prepare.outputs.changelog }} + changelog-artifact-name: ${{ needs.release_prepare.outputs.changelog_artifact_name }} apify-service-account-github-token: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }} github_release: diff --git a/.github/workflows/manual_version_docs.yaml b/.github/workflows/manual_version_docs.yaml index 249d0bfa..3cd71aee 100644 --- a/.github/workflows/manual_version_docs.yaml +++ b/.github/workflows/manual_version_docs.yaml @@ -147,7 +147,7 @@ jobs: needs: [version_docs] runs-on: ubuntu-latest environment: - name: pypi + name: automation deployment: false permissions: contents: read diff --git a/.github/workflows/on_schedule_regenerate_models.yaml b/.github/workflows/on_schedule_regenerate_models.yaml index 8570ba05..9a634a83 100644 --- a/.github/workflows/on_schedule_regenerate_models.yaml +++ b/.github/workflows/on_schedule_regenerate_models.yaml @@ -37,7 +37,7 @@ jobs: name: Regenerate models runs-on: ubuntu-latest environment: - name: pypi + name: automation deployment: false steps: From 62cdb230f9d201a030a5eb4ccac6582653337f8b Mon Sep 17 00:00:00 2001 From: Vlada Dusek Date: Wed, 25 Nov 2026 15:04:39 +0100 Subject: [PATCH 2/3] ci: describe what the `docs` environment restricts --- .github/workflows/manual_release_docs.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/manual_release_docs.yaml b/.github/workflows/manual_release_docs.yaml index 820390ee..442b9fcf 100644 --- a/.github/workflows/manual_release_docs.yaml +++ b/.github/workflows/manual_release_docs.yaml @@ -34,7 +34,8 @@ env: jobs: build_docs: name: Build docs - # Holds only the docs build tokens, so the docs toolchain never runs where the service account token is available. + # Limits the docs build to release branches. The service account token is only in `automation`, which no job that + # runs the docs toolchain uses. environment: name: docs deployment: false From 813d6a5b65159f6d8d9eb4a260ce3acd5dbc6235 Mon Sep 17 00:00:00 2001 From: Vlada Dusek Date: Wed, 25 Nov 2026 15:04:41 +0100 Subject: [PATCH 3/3] ci: run the docs release only from `master` --- .github/workflows/manual_release_stable.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/manual_release_stable.yaml b/.github/workflows/manual_release_stable.yaml index 9a355708..0106122a 100644 --- a/.github/workflows/manual_release_stable.yaml +++ b/.github/workflows/manual_release_stable.yaml @@ -131,6 +131,8 @@ jobs: doc_release: name: Doc release + # The `github-pages` environment deploys only from `master`, so a release from a `release-v*` branch skips the docs. + if: github.ref_name == 'master' needs: [changelog_update, pypi_publish, version_docs] permissions: contents: write