Skip to content

Commit bea8b31

Browse files
committed
deploy static binary to github pages
1 parent 36aed15 commit bea8b31

File tree

3 files changed

+31
-1
lines changed

3 files changed

+31
-1
lines changed

.github/workflows/build.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "Build"
1+
name: "Test, Build, and Deploy"
22

33
on:
44
pull_request:
@@ -19,3 +19,20 @@ jobs:
1919
- uses: DeterminateSystems/nix-installer-action@main
2020
- run: nix profile install nixpkgs#cachix
2121
- run: env CACHIX_AUTH_TOKEN=${{ secrets.CACHIX_AUTH_TOKEN }} cachix watch-exec narya -- nix build --accept-flake-config .
22+
- run: cd dist
23+
- run: ./build.sh
24+
- name: Upload static files as artifact
25+
id: deployment
26+
uses: actions/upload-pages-artifact@v3
27+
with:
28+
path: dist/build/
29+
deploy:
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

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,7 @@ docs/build
4242
.envrc
4343
result
4444
.direnv/
45+
46+
# Github deploy build
47+
dist/build/*
48+
dist/narya-*

dist/build.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
NAME=narya-`git show -s --format=%h`-`date +'%Y%m%d'`
4+
mkdir -p $NAME
5+
cp ../proofgeneral/*.el $NAME
6+
cp ../result/bin/narya $NAME
7+
tar -czf $NAME.tar.gz $NAME
8+
mkdir -p build/releases
9+
mv $NAME.tar.gz build/releases

0 commit comments

Comments
 (0)