Skip to content

Commit 552e84d

Browse files
authored
Merge pull request #164 from vim-jp/feature/fix-astro
fix(ci): pnpm install at 2025
2 parents a920d41 + e0b6002 commit 552e84d

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

.github/workflows/build.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,16 @@ name: Build and Deploy Jekyll site
22

33
on:
44
push:
5-
branches:
6-
- gh-pages
5+
pull_request:
76

8-
permissions:
9-
contents: read
10-
pages: write
11-
id-token: write
127

138
jobs:
149
build:
1510
runs-on: ubuntu-latest
11+
permissions:
12+
actions: write
13+
contents: write
14+
pages: write
1615
steps:
1716
- name: Checkout
1817
uses: actions/checkout@v4
@@ -22,14 +21,20 @@ jobs:
2221

2322
# pnpm
2423
- uses: pnpm/action-setup@v4
24+
with:
25+
run_install: false
26+
version: 10.2.0
2527
- name: build 2025
2628
working-directory: ./2025
2729
run: |
2830
pnpm install --frozen-lockfile
2931
pnpm build
3032
- name: copy 2025 to _site
3133
shell: bash
32-
run: cp -r 2025/dist/ _site/2025/
34+
run: |
35+
sudo chown -R $(whoami) _site
36+
mkdir -p _site/2025
37+
cp -r ./2025/dist/* ./_site/2025/
3338
3439
- name: Upload artifact
3540
uses: actions/upload-pages-artifact@v3
@@ -43,6 +48,11 @@ jobs:
4348
name: github-pages
4449
url: ${{ steps.deployment.outputs.page_url }}
4550
runs-on: ubuntu-latest
51+
permissions:
52+
contents: read
53+
pages: write
54+
id-token: write
55+
if: github.ref == 'refs/heads/gh-pages'
4656
steps:
4757
- name: Deploy to GitHub Pages
4858
id: deployment

0 commit comments

Comments
 (0)