Merge branch 'main' of https://github.com/ppippi-dev/ppippi-dev.githu… #34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Deploy to GitHub Pages | |
| on: | |
| push: | |
| branches: | |
| - main | |
| # GitHub Pages에 배포하기 위한 권한 설정 | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| # 동시 배포 방지 | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v4 | |
| - name: Build with Jekyll | |
| run: | | |
| docker run \ | |
| -v ${{ github.workspace }}:/srv/jekyll -v ${{ github.workspace }}/_site:/srv/jekyll/_site \ | |
| jekyll/builder:latest /bin/bash -c "chmod -R 777 /srv/jekyll && jekyll build --future" | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| # 배포 작업 (main 브랜치에 push된 경우에만) | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |