-
Notifications
You must be signed in to change notification settings - Fork 1
69 lines (59 loc) · 1.64 KB
/
deploy.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: deploy
on:
push:
branches:
- ox-hugo
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
# Cache Emacs packages in ~/.emacs.d/straight
- name: Cache Emacs packages
uses: actions/cache@v3
with:
path: ~/.emacs.d/straight
key: emacs-packages-${{ runner.os }}-${{ hashFiles('**/straight/versions/default.el') }}
restore-keys: |
emacs-packages-${{ runner.os }}-
# Cache Hugo themes
- name: Cache Hugo themes
uses: actions/cache@v3
with:
path: hugo/themes
key: hugo-themes-${{ runner.os }}-${{ hashFiles('hugo/themes/**') }}
restore-keys: |
hugo-themes-${{ runner.os }}-
# Cache Nix store
- name: Cache Nix store
uses: actions/cache@v3
with:
path: /nix/store
key: nix-store-${{ runner.os }}-${{ hashFiles('shell.nix') }}
restore-keys: |
nix-store-${{ runner.os }}-
# Install Emacs using Nix (via purcell/setup-emacs)
- uses: purcell/setup-emacs@master
with:
version: 29.2
# Setup Hugo
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.123.7'
extended: true
# Install dependencies (from Makefile)
- name: Install
run: 'make install'
# Build the site (from Makefile)
- name: Build
run: 'make'
# Deploy to GitHub Pages
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
cname: book.rymcg.tech