-
Notifications
You must be signed in to change notification settings - Fork 68
44 lines (38 loc) · 961 Bytes
/
deploy-pages.yml
File metadata and controls
44 lines (38 loc) · 961 Bytes
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
39
40
41
42
43
44
name: Build and Deploy
on:
push:
branches:
- '**' # Build on all branches
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Install Nix
uses: cachix/install-nix-action@v24
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Build site with Nix
run: |
make nix-site
- name: Upload artifact
if: github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v4
with:
path: _site/
deploy:
if: github.ref == 'refs/heads/main'
environment:
name: github-pages
url: ${{steps.deployment.outputs.page_url}}
permissions:
pages: write
id-token: write
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4