Skip to content

Commit 61a4063

Browse files
committed
feat: add CI workflow for building and deploying demo to ghpages
1 parent 155b05f commit 61a4063

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/ci.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
name: Build
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- uses: actions/checkout@main
24+
- uses: DeterminateSystems/determinate-nix-action@main
25+
- uses: DeterminateSystems/magic-nix-cache-action@main
26+
- name: Run Nix Build
27+
run: |
28+
nix build .#demo --print-build-logs
29+
- uses: actions/upload-pages-artifact@main
30+
if: github.ref == 'refs/heads/main'
31+
with:
32+
path: result
33+
34+
deploy:
35+
name: Deploy
36+
environment:
37+
name: github-pages
38+
url: ${{ steps.deployment.outputs.page_url }}
39+
needs: build
40+
runs-on: ubuntu-latest
41+
if: github.ref == 'refs/heads/main'
42+
steps:
43+
- name: Deploy to GitHub Pages
44+
id: deployment
45+
uses: actions/deploy-pages@main

0 commit comments

Comments
 (0)