-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (34 loc) · 1.07 KB
/
publish.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
name: "Publish on GitHub Pages"
on:
push:
branches:
- "master"
workflow_dispatch:
jobs:
deploy:
runs-on: "ubuntu-22.04"
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
steps:
- uses: "actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11" # v4.1.1
- name: "Set up Hugo"
uses: "peaceiris/actions-hugo@16361eb4acea8698b220b76c0d4e84e1fd22c61d" # renovate: tag=v2.6.0
with:
hugo-version: "0.111.3"
extended: true
- name: "Set up Node.js"
uses: "actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8" # v4.0.2
with:
node-version: 18
- name: "Install npm dependencies"
run: "npm ci"
- name: "Format codes"
run: "npm run format"
- name: "Build"
run: "npm run build"
- name: "Deploy"
uses: "peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847" # v3.9.3
with:
github_token: "${{ secrets.GITHUB_TOKEN }}"
publish_dir: "./public"
cname: "digicre.net"