diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 2ca27a49..5bf6c633 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -13,6 +13,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 - uses: actions/setup-node@v4 with: node-version: 20.x @@ -25,9 +27,22 @@ jobs: gh-release: if: github.event_name != 'pull_request' name: Deploy to GitHub Pages + + # Grant GITHUB_TOKEN the permissions required to make a Pages deployment + permissions: + pages: write # to deploy to Pages + id-token: write # to verify the deployment originates from an appropriate source + + # Deploy to the github-pages environment + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 - uses: actions/setup-node@v4 with: node-version: 20.x @@ -37,11 +52,6 @@ jobs: run: | yarn install --frozen-lockfile yarn build - # Popular action to deploy to GitHub Pages: - # Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@v4 - with: - github_token: ${{ secrets.GH_PAGES_DEPLOY_TOKEN }} - # Build output to publish to the `gh-pages` branch: - publish_dir: ./build + id: deployment + uses: actions/deploy-pages@v4