-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (48 loc) · 1.38 KB
/
deploy-github.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: github pages
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
# Check out the repository
- uses: actions/checkout@v2
# Setup Hugo
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.92.2'
extended: true
# Setup Node.js
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '20.11.0'
# Install dependencies
- name: Install dependencies
run: npm ci
# Clean previous builds
- name: Clean previous builds
run: npm run clean && npm run clean:pagefind
# Build the Hugo site for development
- name: Build Hugo site
run: npm run build:hugo
# Generate Pagefind index
- name: Generate Pagefind index
run: npm run index:pagefind
# Copy Pagefind files to static folder
- name: Copy Pagefind files to static
run: npm run copy:pagefind-generated
# Build the Hugo site for development
- name: Build Hugo site for dev
run: npm run build:dev
# Deploy to GitHub Pages
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
cname: wiki.seasalt.ai