File tree 3 files changed +2811
-2
lines changed
3 files changed +2811
-2
lines changed Original file line number Diff line number Diff line change
1
+ name : Deployment to GitHub Pages
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ push :
6
+ branches :
7
+ - main # <-- specify the branch you want to deploy from
8
+ pull_request :
9
+
10
+ env :
11
+ REPO_NAME : ${{ github.event.repository.name }}
12
+ REPO_OWNER : ${{ github.repository_owner }}
13
+
14
+ permissions :
15
+ contents : write
16
+ pages : write
17
+ id-token : write
18
+
19
+ jobs :
20
+ deploy :
21
+ runs-on : ubuntu-22.04
22
+ concurrency :
23
+ group : ${{ github.workflow }}-${{ github.ref }}
24
+ steps :
25
+ - uses : actions/checkout@v4
26
+ with :
27
+ fetch-depth : 0 # Fetch all history for .GitInfo and .Lastmod
28
+
29
+ - name : Setup Hugo
30
+ uses : peaceiris/actions-hugo@v3
31
+ with :
32
+ hugo-version : ' 0.125.5'
33
+ extended : true
34
+
35
+ - name : Setup Node
36
+ uses : actions/setup-node@v4
37
+ with :
38
+ node-version : ' 20'
39
+ cache : ' npm'
40
+ cache-dependency-path : ' **/package-lock.json'
41
+
42
+ - run : npm ci
43
+ - run :
44
+ hugo --baseURL https://${REPO_OWNER}.github.io/${REPO_NAME} --minify
45
+
46
+ - name : Deploy
47
+ uses : peaceiris/actions-gh-pages@v4
48
+ with :
49
+ github_token : ${{ secrets.GITHUB_TOKEN }}
50
+ user_name : ' github-actions[bot]'
51
+ user_email : ' github-actions[bot]@users.noreply.github.com'
Original file line number Diff line number Diff line change 1
1
/public
2
2
resources /
3
3
node_modules /
4
- package-lock.json
5
- .hugo_build.lock
4
+ .hugo_build.lock
You can’t perform that action at this time.
0 commit comments