summaryrefslogtreecommitdiff
path: root/.github/workflows/deploy.yaml
blob: f1d9155785b9bb8f054d5a59040c3c43ed71c39e (plain)
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 to gh pages

on:
  push:
    branches: [main]
  workflow_dispatch:

permissions:
  contents: read
  pages: write
  id-token: write

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v3

      - name: install Nix
        uses: cachix/install-nix-action@v20

      - name: build site
        run: |
          nix shell nixpkgs#{bash,nodejs,nodePackages.yarn} \
            --command bash -c 'yarn install -D && yarn build'

      - name: setup pages
        uses: actions/configure-pages@v3

      - name: upload artifact
        uses: actions/upload-pages-artifact@v1
        with:
          path: "dist"

      - name: deploy
        id: deployment
        uses: actions/deploy-pages@v1