-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (36 loc) · 1.04 KB
/
ci.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
35
36
37
38
39
40
name: "Build"
on:
pull_request:
branches: ["**"]
push:
branches: ["main"]
jobs:
ci:
name: CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v25
- uses: cachix/cachix-action@v14
with:
name: kubukoz
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Build (main)
if: github.ref == 'refs/heads/main'
run: ./build.sh && cp -Lr ./result public
- uses: JamesIves/github-pages-deploy-action@v4
name: Deploy (main)
if: github.ref == 'refs/heads/main'
with:
branch: gh-pages
folder: ./public
- name: Build (preview)
if: github.event_name == 'pull_request'
run: ./build.sh 'preview' && cp -Lr ./result public-preview
- uses: JamesIves/github-pages-deploy-action@v4
name: Deploy (preview)
if: github.event_name == 'pull_request'
with:
branch: gh-pages
target-folder: ./preview/
folder: ./public-preview