File tree 2 files changed +56
-0
lines changed
2 files changed +56
-0
lines changed Original file line number Diff line number Diff line change
1
+ # This is a basic workflow to help you get started with Actions
2
+
3
+ name : build-and-deploy
4
+
5
+ # Controls when the action will run. Triggers the workflow on push or pull request
6
+ # events but only for the main branch
7
+ on :
8
+ push :
9
+ branches : [main]
10
+ pull_request :
11
+ branches : ["*"]
12
+
13
+ # A workflow run is made up of one or more jobs that can run sequentially or in parallel
14
+ jobs :
15
+ test :
16
+ runs-on : ubuntu-latest
17
+ steps :
18
+ - name : Hugo setup
19
+ uses : peaceiris/actions-hugo@v2
20
+ with :
21
+ hugo-version : " 0.119.0"
22
+ extended : true
23
+ - uses : actions/checkout@v4
24
+ with :
25
+ fetch-depth : 0
26
+ filter : blob:none
27
+ - name : hugo build (test)
28
+ run : |
29
+ hugo --minify --buildFuture --templateMetrics --templateMetricsHints
30
+ deploy :
31
+ runs-on : ubuntu-latest
32
+ if : github.ref == 'refs/heads/main'
33
+ steps :
34
+ - name : Hugo setup
35
+ uses : peaceiris/actions-hugo@v2.4.13
36
+ with :
37
+ hugo-version : " 0.119.0"
38
+ extended : true
39
+ - uses : actions/checkout@v4
40
+ with :
41
+ fetch-depth : 0
42
+ filter : blob:none
43
+ - name : hugo build (deploy)
44
+ run : |
45
+ hugo --minify --buildFuture
46
+ env :
47
+ HUGO_ENV : production
48
+ - name : Upload artifact
49
+ uses : actions/upload-pages-artifact@v3
50
+ with :
51
+ path : public
52
+ if-no-files-found : error
53
+ - name : Deploy to GitHub Pages
54
+ id : deployment
55
+ uses : actions/deploy-pages@v4
Original file line number Diff line number Diff line change 1
1
.DS_Store
2
2
resources /
3
3
* .lock
4
+ public /
You can’t perform that action at this time.
0 commit comments