-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (49 loc) · 1.27 KB
/
deploy.yml
File metadata and controls
57 lines (49 loc) · 1.27 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
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
# Build and deploy to GitHub Pages
# Enable in repo: Settings > Pages > Build and deployment > Source: GitHub Actions
name: Deploy to GitHub Pages
on:
push:
branches: [main]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
env:
# Build for custom domain so docs.gdql.dev/ works (root and assets). Links will point to docs.gdql.dev.
HUGO_BASEURL: https://docs.gdql.dev/
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: "0.146.0"
extended: true
- name: Install dependencies
run: npm ci
- name: Build
run: hugo --minify --gc -b ${{ env.HUGO_BASEURL }}
- name: Upload artifact
uses: actions/upload-pages-artifact@v4
with:
path: public
deploy:
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment: pages
steps:
- name: Deploy
uses: actions/deploy-pages@v4