Skip to content
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
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,13 @@ jobs:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: ./.github/workflows/publish-gh-pages.yml
with:
publish_dir: ./coverage
destination_dir: coverage
artifact_name: coverage
# A called workflow's jobs cannot request more than the caller grants, and
# an enumerated block sets every unlisted scope to `none`.
permissions:
contents: write
secrets:
PUBLISH_DOCS_TOKEN: ${{ secrets.PUBLISH_DOCS_TOKEN }}
pages: write
id-token: write

is-release:
name: Determine whether this is a release merge commit
Expand Down
32 changes: 16 additions & 16 deletions .github/workflows/publish-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,39 @@ name: Publish to GitHub Pages
on:
workflow_call:
inputs:
publish_dir:
description: 'Directory to publish'
required: true
type: string
destination_dir:
description: 'Destination directory on gh-pages branch'
description:
'Subdirectory of the site to publish into; the deployment replaces the
entire site'
required: true
type: string
artifact_name:
description: 'Name of artifact to download'
required: true
type: string
secrets:
PUBLISH_DOCS_TOKEN:
required: true

jobs:
publish:
name: Publish to GitHub Pages
runs-on: ubuntu-latest
environment: github-pages
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
contents: write
pages: write
id-token: write
steps:
- name: Download artifact
uses: actions/download-artifact@v8
with:
name: ${{ inputs.artifact_name }}
path: ${{ inputs.publish_dir }}
path: _site/${{ inputs.destination_dir }}

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v5
with:
personal_token: ${{ secrets.PUBLISH_DOCS_TOKEN }}
publish_dir: ${{ inputs.publish_dir }}
destination_dir: ${{ inputs.destination_dir }}
path: _site

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5