File tree Expand file tree Collapse file tree 1 file changed +10
-14
lines changed Expand file tree Collapse file tree 1 file changed +10
-14
lines changed Original file line number Diff line number Diff line change 2
2
name : Deploy Hugo site to Pages
3
3
4
4
on :
5
- # Runs on pushes targeting the default branch
6
5
push :
7
6
branches :
8
7
- main
9
-
10
- # Allows you to run this workflow manually from the Actions tab
11
8
workflow_dispatch :
12
9
13
- # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
14
10
permissions :
15
11
contents : read
16
12
pages : write
17
13
id-token : write
18
14
19
- # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
20
- # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
21
15
concurrency :
22
16
group : " pages"
23
17
cancel-in-progress : false
24
18
25
- # Default to bash
26
19
defaults :
27
20
run :
28
21
shell : bash
29
22
30
23
jobs :
31
- # Build job
32
24
build :
33
25
runs-on : ubuntu-latest
34
26
env :
@@ -52,27 +44,31 @@ jobs:
52
44
run : " [[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
53
45
- name : Build with Hugo
54
46
env :
55
- # For maximum backward compatibility with Hugo modules
56
47
HUGO_ENVIRONMENT : production
57
48
HUGO_ENV : production
58
49
run : |
59
50
hugo \
60
51
--gc \
61
52
--minify \
62
- --baseURL "${{ steps.pages.outputs.base_url }}/"
63
- - name : Upload artifact
64
- uses : actions/upload-pages- artifact@v1
53
+ --baseURL "${{ steps.pages.outputs.base_url }}/"
54
+ - name : Upload build artifact
55
+ uses : actions/upload-artifact@v3.1.2
65
56
with :
57
+ name : github-pages
66
58
path : ./public
67
59
68
- # Deployment job
69
60
deploy :
70
61
environment :
71
62
name : github-pages
72
63
url : ${{ steps.deployment.outputs.page_url }}
73
64
runs-on : ubuntu-latest
74
65
needs : build
75
66
steps :
67
+ - name : Download artifact
68
+ uses : actions/download-artifact@v3
69
+ with :
70
+ name : github-pages
71
+ path : ./public
76
72
- name : Deploy to GitHub Pages
77
73
id : deployment
78
- uses : actions/deploy-pages@v2
74
+ uses : actions/deploy-pages@v2
You can’t perform that action at this time.
0 commit comments