File tree Expand file tree Collapse file tree 1 file changed +37
-5
lines changed
Expand file tree Collapse file tree 1 file changed +37
-5
lines changed Original file line number Diff line number Diff line change 1- name : Jekyll site CI
1+ name : Build and Deploy to GitHub Pages
22
33on :
44 push :
55 branches : [ "main" ]
66 pull_request :
77 branches : [ "main" ]
88
9+ # GitHub Pages에 배포하기 위한 권한 설정
10+ permissions :
11+ contents : read
12+ pages : write
13+ id-token : write
14+
15+ # 동시 배포 방지
16+ concurrency :
17+ group : " pages"
18+ cancel-in-progress : false
19+
920jobs :
1021 build :
11-
1222 runs-on : ubuntu-latest
13-
23+
1424 steps :
15- - uses : actions/checkout@v4
16- - name : Build the site in the jekyll/builder container
25+ - name : Checkout
26+ uses : actions/checkout@v4
27+
28+ - name : Setup Pages
29+ uses : actions/configure-pages@v4
30+
31+ - name : Build with Jekyll
1732 run : |
1833 docker run \
1934 -v ${{ github.workspace }}:/srv/jekyll -v ${{ github.workspace }}/_site:/srv/jekyll/_site \
2035 jekyll/builder:latest /bin/bash -c "chmod -R 777 /srv/jekyll && jekyll build --future"
36+
37+ - name : Upload artifact
38+ uses : actions/upload-pages-artifact@v3
39+
40+ # 배포 작업 (main 브랜치에 push된 경우에만)
41+ deploy :
42+ environment :
43+ name : github-pages
44+ url : ${{ steps.deployment.outputs.page_url }}
45+ runs-on : ubuntu-latest
46+ needs : build
47+ if : github.ref == 'refs/heads/main' && github.event_name == 'push'
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