about summary refs log tree commit diff
path: root/.github/workflows/doc.yml
blob: dcf5013b0ea7f53e4db862c477be600af500dbd0 (plain) (blame)
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
name: "Deploy Documentation"

on:
  push:
    branches: [ master ]

jobs:
  doc:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3.5.2
      - uses: cachix/install-nix-action@v20
        with:
          nix_path: nixpkgs=channel:nixos-unstable
      - uses: cachix/cachix-action@v12
        with:
          name: spacecookie
          authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
      - name: Build web output
        run: |
          nix-build -A deploy docs/web.nix \
            --option substituters 'https://cache.tvl.su' \
            --option trusted-public-keys 'cache.tvl.su:kjc6KOMupXc1vHVufJUoDUYeLzbwSr9abcAKdn/U1Jk='
          ./result -w tmp
      - name: Deploy output to GitHub Pages
        uses: JamesIves/github-pages-deploy-action@v4.4.1
        with:
          GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
          BRANCH: gh-pages
          CLEAN: true
          FOLDER: tmp