Merge pull request #177 from microbiomedata/176-decouple-build-and-pu… #175
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This GitHub Actions workflow deploys the website file tree to GitHub Pages. | |
# Reference: https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions | |
name: Deploy to GitHub Pages | |
on: | |
push: { branches: [ main ] } | |
workflow_dispatch: { } | |
# Reference: https://docs.github.com/en/actions/using-jobs/using-concurrency | |
concurrency: | |
group: github-pages | |
cancel-in-progress: true | |
jobs: | |
# Use an existing workflow to assemble the website file tree that, in this workflow, we will deploy to GitHub Pages. | |
# Reference: https://docs.github.com/en/actions/using-workflows/reusing-workflows#calling-a-reusable-workflow | |
assemble-website: | |
name: Assemble website | |
uses: ./.github/workflows/assemble-website.yml | |
deploy: | |
name: Deploy website | |
needs: | |
- assemble-website | |
runs-on: ubuntu-latest | |
# Reference: https://github.com/actions/deploy-pages | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
# Reference: https://github.com/actions/deploy-pages | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 | |
with: | |
# Note: The artifact name is "github-pages" by default; so, this specification is redundant. We include it | |
# anyway, here, as a reminder for people that will be implementing workflows that consume the same | |
# artifact; e.g., spell checkers and link checkers. | |
artifact_name: github-pages |