Skip to content

Commit b255e1f

Browse files
committed
action workflow
1 parent d14bd1c commit b255e1f

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

.github/workflows/build-haunt.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: build haunt
2+
run-name: ${{ github.actor }} is building the website
3+
on: [push]
4+
jobs:
5+
# Build job
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout
10+
uses: actions/checkout@v4
11+
- name: Setup Pages
12+
id: pages
13+
uses: actions/configure-pages@v5
14+
- name: Build with Nix
15+
uses: cachix/install-nix-action@v31
16+
with:
17+
nix_path: nixpkgs=channel:nixos-unstable
18+
- run: nix-shell -p haunt --command "haunt build"
19+
- name: Upload artifact
20+
uses: actions/upload-pages-artifact@v3
21+
with:
22+
path: site/
23+
24+
# Deployment job
25+
deploy:
26+
permissions:
27+
contents: read
28+
pages: write
29+
id-token: write
30+
environment:
31+
name: github-pages
32+
url: ${{steps.deployment.outputs.page_url}}
33+
runs-on: ubuntu-latest
34+
needs: build
35+
steps:
36+
- name: Deploy to GitHub Pages
37+
id: deployment
38+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)