-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (30 loc) · 1020 Bytes
/
gh-pages.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Build and deploy MkDocs to gh-pages for main branch
name: gh-pages
on:
check_suite:
types: [completed]
permissions:
contents: write
jobs:
gh-pages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
ref: ${{ github.event.check_suite.head_sha }}
- uses: cachix/install-nix-action@6004951b182f8860210c8d6f0d808ec5b1a33d28 # v25
with:
extra_nix_config: |
substituters = https://cache.garnix.io
trusted-public-keys = cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g=
- name: Build the docs
id: build
run: |
nix build .#docs
echo "result=$(readlink ./result)" >> $GITHUB_OUTPUT
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: "${{ steps.build.outputs.result }}/"