-
Notifications
You must be signed in to change notification settings - Fork 30
38 lines (33 loc) · 992 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
36
37
38
name: Deploy content to Pages
on:
push:
branches:
- main
- staging
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-22.04
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v22
- name: Build
id: build
run: |
nix build ./dev#docs --override-input srvos "path:$PWD"
echo "result=$(readlink ./result)" >> $GITHUB_OUTPUT
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
# If you're changing the branch from main,
# also change the `main` in `refs/heads/main`
# below accordingly.
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: "${{ steps.build.outputs.result }}/"