-
Notifications
You must be signed in to change notification settings - Fork 14
35 lines (34 loc) · 1.25 KB
/
main.yml
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
name: rebuild and deploy
on: [push, pull_request]
jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
with:
persist-credentials: false
- uses: cachix/install-nix-action@master
- uses: cachix/cachix-action@master
with:
name: zoranbosnjak
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- name: rebuild
run: |
nix-build --argstr gitrev $GITHUB_SHA
rsync -r -L --delete result/ output/
find output -type d | xargs chmod 755
find output -type f | xargs chmod 644
touch output/.nojekyll
- name: show event
run: echo ${{ github.event_name }}
- name: show ref
run: echo ${{ github.ref }}
- name: deploy
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
uses: JamesIves/github-pages-deploy-action@3.7.1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: output
CLEAN: true
SINGLE_COMMIT: true