Include Google Analytics and license #14
Workflow file for this run
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: Build and publish documentation | |
on: push | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install pipx | |
run: sudo apt-get install -y pipx | |
- name: Install hatch | |
run: pipx install hatch==1.9.4 | |
- uses: actions/checkout@v4 | |
- name: Build documentation | |
run: hatch run dev:build | |
env: | |
GA_TOKEN: ${{ secrets.GA_TOKEN }} | |
- name: Write CNAME | |
run: echo "docs.sml.kplabs.space" > build/html/CNAME | |
- uses: actions/upload-pages-artifact@v3 | |
with: | |
path: build/html | |
deploy: # https://github.com/actions/deploy-pages | |
needs: build | |
if: github.ref == format('refs/heads/{0}', 'github-deploy') # github.event.repository.default_branch) | |
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment | |
permissions: | |
pages: write # to deploy to Pages | |
id-token: write # to verify the deployment originates from an appropriate source | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |