Skip to content

Merge pull request #32 from seojaeohcode/practice #50

Merge pull request #32 from seojaeohcode/practice

Merge pull request #32 from seojaeohcode/practice #50

Workflow file for this run

# .github/workflows/docs.yml
name: Deploy Sphinx Documentation
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5 # v4 -> v5
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install sphinx sphinx-rtd-theme
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Build documentation
run: |
# [cite_start]Makefile에 정의된 변수를 사용하여 빌드합니다. [cite: 5, 6, 8]
cd docs
make html
- name: Setup Pages
uses: actions/configure-pages@v5 # v3 -> v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3 # v2 -> v3
with:
path: ./docs/build/html
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4 # v2 -> v4