Skip to content
This repository was archived by the owner on Nov 9, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,19 @@ jobs:
runs-on: ubuntu-latest
environment: github-pages
permissions:
contents: write
contents: read
id-token: write
steps:
- name: Ensure `destination_dir` is not empty
if: ${{ inputs.destination_dir == '' }}
run: exit 1
- name: Get access token
id: get-token
uses: MetaMask/github-tools/.github/actions/get-token@v1
with:
token-exchange-url: ${{ vars.TOKEN_EXCHANGE_URL }}
permissions: |
contents: write
- name: Checkout and setup environment
uses: MetaMask/action-checkout-and-setup@v3
with:
Expand All @@ -28,6 +36,6 @@ jobs:
- name: Deploy to `${{ inputs.destination_dir }}` directory of `gh-pages` branch
uses: peaceiris/actions-gh-pages@de7ea6f8efb354206b205ef54722213d99067935
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
personal_token: ${{ steps.get-token.outputs.token }}
publish_dir: ./docs
destination_dir: ${{ inputs.destination_dir }}
3 changes: 2 additions & 1 deletion .github/workflows/publish-main-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ jobs:
publish-to-gh-pages:
name: Publish docs to `staging` directory of `gh-pages` branch
permissions:
contents: write
contents: read
id-token: write
uses: ./.github/workflows/publish-docs.yml
with:
destination_dir: staging
3 changes: 2 additions & 1 deletion .github/workflows/publish-rc-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ jobs:
publish-to-gh-pages:
name: Publish docs to `rc-${{ needs.get-release-version.outputs.release-version }}` directory of `gh-pages` branch
permissions:
contents: write
contents: read
id-token: write
uses: ./.github/workflows/publish-docs.yml
needs: get-release-version
with:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ jobs:
name: Publish docs to `${{ needs.get-release-version.outputs.RELEASE_VERSION }}` directory of `gh-pages` branch
needs: get-release-version
permissions:
contents: write
contents: read
id-token: write
uses: ./.github/workflows/publish-docs.yml
with:
destination_dir: ${{ needs.get-release-version.outputs.RELEASE_VERSION }}
Expand All @@ -120,7 +121,8 @@ jobs:
name: Publish docs to `latest` directory of `gh-pages` branch
needs: publish-npm
permissions:
contents: write
contents: read
id-token: write
uses: ./.github/workflows/publish-docs.yml
with:
destination_dir: latest
Expand Down