File tree Expand file tree Collapse file tree 1 file changed +26
-13
lines changed
Expand file tree Collapse file tree 1 file changed +26
-13
lines changed Original file line number Diff line number Diff line change 1- name : ' build'
1+ name : build
2+
23on :
34 pull_request :
45 push :
6+
57jobs :
68 build :
79 runs-on : ubuntu-latest
10+ timeout-minutes : 30
11+
812 steps :
9- - name : ' Checkout codebase '
10- if : github.event_name == 'push'
11- uses : actions/checkout@v2.4.0
13+ - name : Checkout (push/merge)
14+ if : ${{ github.event_name != 'pull_request' }}
15+ uses : actions/checkout@v5
1216 with :
1317 fetch-depth : 0
1418
15- - name : ' Checkout codebase '
16- if : github.event_name == 'pull_request'
17- uses : actions/checkout@v2.4.0
19+ - name : Checkout (PR head)
20+ if : ${{ github.event_name == 'pull_request' }}
21+ uses : actions/checkout@v5
1822 with :
1923 fetch-depth : 0
2024 ref : ${{ github.event.pull_request.head.sha }}
2125
22- - uses : cachix/install-nix-action@v14
23- - run : NIXPKGS_ALLOW_UNFREE=1 nix --experimental-features 'nix-command flakes' build -L --impure
24- - name : ' Copy book'
25- run : cp result/share/book.pdf .
26- - name : ' Upload artifact to GitHub'
27- uses : actions/upload-artifact@v2.2.4
26+ - name : Install Nix
27+ uses : cachix/install-nix-action@v31
28+
29+ - name : Build (Nix flake)
30+ run : nix build -L --impure
31+ env :
32+ NIXPKGS_ALLOW_UNFREE : 1
33+
34+ - name : Copy book
35+ run : cp result/share/book.pdf ./book.pdf
36+
37+ - name : Upload artifact
38+ uses : actions/upload-artifact@v4
2839 with :
2940 name : book.pdf
3041 path : book.pdf
42+ if-no-files-found : error
43+ retention-days : 30
You can’t perform that action at this time.
0 commit comments