File tree Expand file tree Collapse file tree 1 file changed +28
-13
lines changed
Expand file tree Collapse file tree 1 file changed +28
-13
lines changed Original file line number Diff line number Diff line change 11name : Build & Deploy Docs
22
33on :
4- push :
5- branches : [main]
4+ push :
5+ branches : [main]
66
7- permissions : # ← 필수! contents:write
8- contents : write
9- pages : write
7+ permissions :
8+ contents : read # 소스 코드 체크아웃용
9+ pages : write # GitHub Pages 배포권한
10+ id-token : write # GitHub Pages에 필요한 권한
11+
12+ concurrency :
13+ group : " pages"
14+ cancel-in-progress : true
1015
1116jobs :
12- deploy :
17+ build :
1318 runs-on : ubuntu-latest
1419
1520 steps :
1621 - uses : actions/checkout@v3
1722
18- - uses : pnpm/action-setup@v4 # version 지정 X (package.json에 있음)
23+ - uses : pnpm/action-setup@v4
1924
2025 - uses : actions/setup-node@v3
2126 with :
@@ -26,12 +31,22 @@ jobs:
2631 run : pnpm install
2732
2833 - name : Build docs
29- run : pnpm rspress build # 결과: docs/dist
34+ run : pnpm rspress build
3035 working-directory : ./docs
3136
32- - name : Deploy to GitHub Pages
33- if : github.ref == 'refs/heads/main'
34- uses : peaceiris/actions-gh-pages@v3
37+ - name : Upload artifact
38+ uses : actions/upload-pages-artifact@v3
3539 with :
36- github_token : ${{ secrets.GITHUB_TOKEN }}
37- publish_dir : docs/doc_build # ← 존재 확정
40+ path : docs/doc_build
41+
42+ deploy :
43+ needs : build
44+ runs-on : ubuntu-latest
45+ environment :
46+ name : github-pages
47+ url : ${{ steps.deployment.outputs.page_url }}
48+
49+ steps :
50+ - name : Deploy to GitHub Pages
51+ id : deployment
52+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments