Skip to content

Commit

Permalink
ci: Deploy documentation into GitHub Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
attakei committed Nov 11, 2023
1 parent 020e2a3 commit eb3db2c
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
47 changes: 47 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@ dependencies = [
dynamic = ["version", "description"]

[project.optional-dependencies]
doc = []
docs = []
test = [
"BeautifulSoup4",
"pytest ==7.*",
]

[project.urls]
Home = "https://github.com/atsphinx/color-text"
Document = "https://atsphinx.github.io/color-text"

[tool.flit.module]
name = "atsphinx.color_text"
Expand Down

0 comments on commit eb3db2c

Please sign in to comment.