Skip to content

feat/graphs: redirect when hitting a leaf node #82

feat/graphs: redirect when hitting a leaf node

feat/graphs: redirect when hitting a leaf node #82

Workflow file for this run

# Sample workflow for building and deploying an anna site to GitHub pages
name: Build
on:
push:
branches: [main]
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# 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
defaults:
run:
shell: bash
jobs:
build:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{steps.deployment.outputs.page_url}}
steps:
- uses: actions/checkout@v4
- name: setup go
uses: actions/setup-go@v4
with:
go-version-file: "go.mod"
- name: test anna
run: go test ./...
- name: build anna
run: go build
- name: Insert commit hash in footer
run: |
sed -i "s/COMMIT_HASH/${{ github.sha }}/g" site/layout/partials/footer.html
- name: build site with anna
run: |
./anna
- name: upload /rendered
uses: actions/upload-artifact@master
with:
path: "site/rendered"
if-no-files-found: error
deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: github-pages
url: ${{steps.deployment.outputs.page_url}}
steps:
- name: download /rendered
uses: actions/download-artifact@master
- name: setup gh-pages
uses: actions/configure-pages@v4
- name: unpack artifact
uses: actions/upload-pages-artifact@v3
with:
path: "artifact"
- name: deploy site
id: deployment
uses: actions/deploy-pages@v4