Skip to content

Commit 7984337

Browse files
committed
try fix deploy github pages
1 parent 5cd479a commit 7984337

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

.github/workflows/pages.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,15 @@ on:
99
- ".github/workflows/pages.yml"
1010
workflow_dispatch:
1111

12-
permissions:
13-
contents: read
14-
pages: write
15-
id-token: write
16-
1712
concurrency:
1813
group: pages
1914
cancel-in-progress: false
2015

2116
jobs:
2217
build:
2318
runs-on: ubuntu-latest
19+
permissions:
20+
contents: read
2421
steps:
2522
- name: Checkout
2623
uses: actions/checkout@v4
@@ -38,14 +35,21 @@ jobs:
3835

3936
- name: Build documentation
4037
working-directory: docs
38+
env:
39+
JEKYLL_ENV: production
4140
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
4241

4342
- name: Upload artifact
44-
uses: actions/upload-pages-artifact@v3
43+
uses: actions/upload-pages-artifact@v4
4544
with:
45+
name: github-pages
4646
path: docs/_site
4747

4848
deploy:
49+
if: github.ref == 'refs/heads/main'
50+
permissions:
51+
pages: write
52+
id-token: write
4953
environment:
5054
name: github-pages
5155
url: ${{ steps.deployment.outputs.page_url }}
@@ -55,3 +59,5 @@ jobs:
5559
- name: Deploy to GitHub Pages
5660
id: deployment
5761
uses: actions/deploy-pages@v4
62+
with:
63+
artifact_name: github-pages

0 commit comments

Comments
 (0)