-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (31 loc) · 1.05 KB
/
publish.yaml
File metadata and controls
31 lines (31 loc) · 1.05 KB
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
name: "Publish site"
on:
# Run only when pushing to master branch
push:
branches:
- master
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: cachix/install-nix-action@v17
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
trusted-public-keys = cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
substituters = https://cache.garnix.io https://cache.nixos.org/
- name: Build sources 🔧
run: |
nix build -j 4
- name: Generate HTML 🔧
run: |
mkdir ./output
export TARGET=$(pwd)/output
nix develop -c tailwind-run -o static/tailwind.css 'src/**/*.hs'
./result/bin/MoodTracker-Tutorial gen $TARGET
- name: Deploy to gh-pages 🚀
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: output