File tree 1 file changed +39
-0
lines changed
1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Deploy GitHub Pages
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main # Set a branch name to trigger deployment
7
+ pull_request :
8
+
9
+ jobs :
10
+ deploy :
11
+ runs-on : ubuntu-20.04
12
+ permissions :
13
+ contents : write
14
+ concurrency :
15
+ group : ${{ github.workflow }}-${{ github.ref }}
16
+ steps :
17
+ - uses : actions/checkout@v3
18
+ with :
19
+ submodules : true # Fetch any Git submodules (true OR recursive)
20
+ fetch-depth : 0 # Fetch all history for .GitInfo and .Lastmod
21
+
22
+ - name : Setup Hugo
23
+ uses : peaceiris/actions-hugo@v2
24
+ with :
25
+ hugo-version : ' latest'
26
+ extended : true
27
+
28
+ - name : Build
29
+ run : hugo --minify
30
+
31
+ - name : Deploy
32
+ uses : peaceiris/actions-gh-pages@v3
33
+ # If you're changing the branch from main,
34
+ # also change the `main` in `refs/heads/main`
35
+ # below accordingly.
36
+ if : ${{ github.ref == 'refs/heads/main' }}
37
+ with :
38
+ github_token : ${{ secrets.GITHUB_TOKEN }}
39
+ publish_dir : ./public
You can’t perform that action at this time.
0 commit comments