Repository navigation
Polish the text, landing page and mobile layout once more #34
Workflow file for this run
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: Book | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: book-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-python@v7 | |
| with: | |
| python-version: "3.12" | |
| # 노트북은 실행하지 않고 저장된 출력을 그대로 렌더링하므로 jupyter만 있으면 됩니다. | |
| - name: Install Jupyter | |
| run: pip install jupyter | |
| - uses: quarto-dev/quarto-actions/setup@v2 | |
| with: | |
| version: 1.8.25 | |
| - name: Prepare book sources | |
| run: python book/prepare.py | |
| - name: Render book | |
| working-directory: book | |
| run: quarto render --to html | |
| - name: Upload preview | |
| if: github.event_name == 'pull_request' | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: book-preview | |
| path: book/_book | |
| retention-days: 7 | |
| # gh-pages 브랜치에 push하지 않고 Pages에 직접 배포합니다(브랜치 보호 규칙과 무관). | |
| - name: Upload Pages artifact | |
| if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: book/_book | |
| deploy: | |
| if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |