generated from srid/ema-template
-
Notifications
You must be signed in to change notification settings - Fork 4
34 lines (34 loc) · 1.01 KB
/
publish.yaml
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: "Publish site"
on:
# Run only when pushing to master branch
push:
branches:
- master
pull_request:
jobs:
static-site:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: cachix/install-nix-action@v17
with:
extra_nix_config: |
experimental-features = nix-command flakes
- name: Build 🔧
run: |
nix build -j 4
nix run .#tailwind-run -- --help # Just to cache the Nix build
- name: Generate HTML 🔧
if: github.ref == 'refs/heads/master'
run: |
mkdir ./output
export TARGET=$(pwd)/output
nix run .#tailwind-run -- -o static/tailwind.css 'src/**/*.hs'
./result/bin/fpindia-site gen $TARGET
- name: Deploy to gh-pages 🚀
if: github.ref == 'refs/heads/master'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: output
cname: functionalprogramming.in