Deploy docs #198
This file contains hidden or 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 docs | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
workflow_dispatch: | |
schedule: | |
# once a day at midnight (0:00 UTC) | |
- cron: '0 0 * * *' | |
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | |
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v5 | |
# keep in sync with `make lint` in Makefile | |
- name: Lint Dockerfile | |
uses: hadolint/[email protected] | |
with: | |
dockerfile: Dockerfile | |
ignore: DL3008,DL3015 | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v5 | |
- name: Build documentation | |
run: make build | |
- name: Copy docs to host | |
run: make serve && make copy-host && make stop | |
- name: Upload Pages artifact | |
if: github.event_name != 'pull_request' | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: ./dist/ | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
if: github.event_name != 'pull_request' | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v5 | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |