Merge pull request #44 from ComputationalPhysiology/pre-commit-ci-upd… #17
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
name: Deploy to github pages | |
on: | |
push: | |
branches: [main] | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
# Build documentation/website. Will be downloaded in first step | |
build-docs: | |
uses: ./.github/workflows/build_docs.yml | |
deploy: | |
needs: [build-docs] | |
# Allow one concurrent deployment | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download docs artifact | |
# docs artifact is uploaded by build-docs job | |
uses: actions/download-artifact@v4 | |
with: | |
name: documentation | |
path: "./public" | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: "./public" | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Pages | |
uses: actions/configure-pages@v5 | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |