diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 895e7460..2b0658c8 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -14,12 +14,16 @@ concurrency: permissions: contents: write pull-requests: write + actions: write jobs: release-please: runs-on: ubuntu-latest + outputs: + release_created: ${{ steps.release.outputs.release_created }} steps: - name: Run Release Please + id: release uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0 with: # The GitHub token for creating releases and pull requests @@ -30,3 +34,15 @@ jobs: # Path to .release-please-manifest.json manifest-file: .release-please-manifest.json + + # Releases created with GITHUB_TOKEN do not trigger `release` events, + # so the website rebuild has to be dispatched explicitly. + website: + needs: release-please + if: needs.release-please.outputs.release_created == 'true' + runs-on: ubuntu-latest + steps: + - name: Trigger website deployment + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: gh workflow run website.yml --repo "${{ github.repository }}" --ref main