diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml new file mode 100644 index 0000000..6f4c73d --- /dev/null +++ b/.github/workflows/deploy-docs.yml @@ -0,0 +1,47 @@ +name: Deploy docs + +on: + push: + branches: + - 'main' + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Setup python + uses: actions/setup-python@v4 + with: + architecture: x64 + python-version: '3.10' + - name: Install dependencies + run: | + pip install '.[docs]' + - name: Build documentation + run: | + make -C docs dirhtml + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + with: + path: docs/_build/dirhtml/ + deploy: + 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@v1 diff --git a/pyproject.toml b/pyproject.toml index ea89aa3..1d07b7c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,7 +26,7 @@ dependencies = [ dynamic = ["version", "description"] [project.optional-dependencies] -doc = [] +docs = [] test = [ "BeautifulSoup4", "pytest ==7.*", @@ -34,6 +34,7 @@ test = [ [project.urls] Home = "https://github.com/atsphinx/color-text" +Document = "https://atsphinx.github.io/color-text" [tool.flit.module] name = "atsphinx.color_text"