Add GitHub Actions workflow to deploy documentation to GitHub Pages. #1
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: Doc build | |
on: | |
push: | |
branches: ['main', 'docdeps'] | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: earthly/actions-setup@v1 | |
- name: Build documentation | |
run: | | |
earthly --ci +doc | |
upload: | |
needs: build | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Upload build for GitHub Pages | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: doc/_build/html | |
deploy: | |
permissions: | |
contents: read | |
id-token: write | |
pages: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
needs: upload | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |