Skip to content

Commit

Permalink
tried fixing the problem but gave up
Browse files Browse the repository at this point in the history
  • Loading branch information
watakandai committed Jul 26, 2024
1 parent fce2671 commit 86ce419
Show file tree
Hide file tree
Showing 6 changed files with 212 additions and 174 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/deploy-documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: "Deploy Documentation"

on:
push:
branches:
- main # Change to your main branch name if different

env:
os: ubuntu-latest
python-version: '3.10'
poetry-version: '1.8.3'
poetry-home: ''
poetry-path: ''
poetry-cache-paths: |
~/.local/share/pypoetry
~/.local/bin/poetry
poetry-cache-key-fmt: 'poetry-{0}-{1}-python-{2}'

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ env.python-version }}
id: setup-python
uses: actions/setup-python@v4
with:
python-version: ${{ env.python-version }}

- name: Set up Poetry ${{ env.poetry-version }}
id: setup-poetry
uses: ./.github/actions/setup-poetry
with:
cache-path: ${{ env.poetry-cache-paths }}
cache-key: ${{ format(env.poetry-cache-key-fmt, env.poetry-version, env.os, steps.setup-python.outputs.python-version) }}
poetry-version: ${{ env.poetry-version }}
poetry-home: ${{ env.poetry-home }}
poetry-path: ${{ env.poetry-path }}

- name: Set up Poetry dependencies
id: setup-poetry-dependencies
uses: ./.github/actions/setup-poetry-dependencies
with:
cache-key: ${{ format(env.venv-cache-key-fmt, env.os, steps.setup-python.outputs.python-version, hashFiles('**/poetry.lock')) }}
python-version: ${{ steps.setup-python.outputs.python-version }}
poetry-install-args: --no-interaction --with docs

- name: Sphinx build
run: |
${{ steps.setup-poetry-dependencies.outputs.venv-activate }}
python -m sphinx docs docs/build
# Great extra actions to compose with:
# Create an artifact of the html output.
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: html-docs
path: docs/build
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
# if: github.ref == 'refs/heads/main'
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/build
37 changes: 0 additions & 37 deletions .github/workflows/main.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ env:

jobs:
build:
runs-on: ${{ env.os }}
runs-on: ubuntu-latest
permissions:
contents: write

Expand Down Expand Up @@ -45,7 +45,7 @@ jobs:
with:
cache-key: ${{ format(env.venv-cache-key-fmt, env.os, steps.setup-python.outputs.python-version, hashFiles('**/poetry.lock')) }}
python-version: ${{ steps.setup-python.outputs.python-version }}
poetry-install-args: --no-interaction --with dev
poetry-install-args: --no-interaction --with docs

- name: Sphinx build
run: |
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ name: '🧪 Test'
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
py-test:
Expand Down
Loading

0 comments on commit 86ce419

Please sign in to comment.