diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c837ad4b..a7432cfa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,6 +39,7 @@ jobs: - name: Run Tests run: pipenv run python3 manage.py test + docs: runs-on: ubuntu-latest @@ -68,6 +69,5 @@ jobs: - name: Build Docs run: | - cd docs pipenv run make html diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml new file mode 100644 index 00000000..231d6318 --- /dev/null +++ b/.github/workflows/deploy-docs.yml @@ -0,0 +1,60 @@ +name: Deploy docs + +on: + push: + branches: [master] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + python-version: + - 3.8 + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + cache: pipenv + + - name: Install Sphinx + run: sudo apt-get install python3-sphinx + + - name: Install pipenv + run: pip install pipenv + + - name: Install dependencies + run: pipenv install --dev + + - name: Build docs + run: | + cd docs + pipenv run make html + + - name: Upload docs artifact + uses: actions/upload-pages-artifact@v3 + with: + path: docs/build/html + + deploy: + runs-on: ubuntu-latest + needs: build + + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + permissions: + pages: write + id-token: write + + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4