Skip to content

Commit 6c142d5

Browse files
author
gorillanet
committed
fix wf2
1 parent db4394a commit 6c142d5

File tree

1 file changed

+27
-16
lines changed

1 file changed

+27
-16
lines changed

.github/workflows/gh-pages.yml

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,39 @@ on:
55
branches:
66
- main
77

8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
813
jobs:
9-
deploy:
14+
build:
1015
runs-on: ubuntu-latest
16+
env:
17+
HUGO_VERSION: 0.145.0
1118
steps:
12-
- uses: actions/checkout@v3
19+
- name: Install Hugo CLI
20+
run: |
21+
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
22+
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
23+
- name: Checkout
24+
uses: actions/checkout@v4
1325
with:
1426
submodules: true
1527
fetch-depth: 0
16-
17-
- name: Setup Hugo
18-
uses: peaceiris/actions-hugo@v3
19-
with:
20-
hugo-version: 'latest'
21-
extended: true
22-
2328
- name: Build
2429
run: hugo --minify
25-
26-
- name: Deploy
27-
uses: peaceiris/actions-gh-pages@v4
30+
- name: Upload artifact
31+
uses: actions/upload-pages-artifact@v3
2832
with:
29-
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
30-
publish_dir: ./public
31-
user_name: 'github-actions[bot]'
32-
user_email: 'github-actions[bot]@users.noreply.github.com'
33+
path: ./public
34+
deploy:
35+
environment:
36+
name: github-pages
37+
url: ${{ steps.deployment.outputs.page_url }}
38+
runs-on: ubuntu-latest
39+
needs: build
40+
steps:
41+
- name: Deploy to GitHub Pages
42+
id: deployment
43+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)