Skip to content

Merge pull request #196 from microbiomedata/186-website-file-tree-con… #180

Merge pull request #196 from microbiomedata/186-website-file-tree-con…

Merge pull request #196 from microbiomedata/186-website-file-tree-con… #180

# 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:
# Run this workflow whenever someone pushes commits or tags to the `main` branch.
# Reference: https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#push
push: { branches: [ main ] }
# Allow this workflow to be run manually (e.g., via the "Actions" tab on GitHub).
# Reference: https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#workflow_dispatch
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