Skip to content

Commit

Permalink
ci: deploy documentation to GitHub Pages (#56)
Browse files Browse the repository at this point in the history
* ci: add step for uploading docs artifact

* ci: add Deploy job for deploying docs to GitHub Pages

* ci: restrict docs upload only on Ubuntu

* docs(readme): add docs deployment to the key features
  • Loading branch information
threeal authored Nov 14, 2023
1 parent d31878d commit 9eeb8df
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
31 changes: 30 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [Windows, Ubuntu, macOS]
os: [windows, ubuntu, macos]
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
Expand Down Expand Up @@ -46,3 +46,32 @@ jobs:

- name: Generate docs
run: poetry run poe docs

- name: Upload docs artifact
if: ${{ matrix.os }} == 'ubuntu'
uses: actions/upload-pages-artifact@v2.0.0
with:
path: docs

deploy:
name: Deploy
if: github.event_name != 'pull_request' && github.ref_name == 'main'
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
concurrency:
group: pages
cancel-in-progress: false
steps:
- name: Setup Pages
uses: actions/configure-pages@v3.0.6

- name: Deploy Pages
id: deployment
uses: actions/deploy-pages@v2.0.4
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ The Python Starter is a [GitHub repository template](https://docs.github.com/en/
- Import sorting with [isort](https://pycqa.github.io/isort/).
- Static analysis and linting with [Flake8](https://flake8.pycqa.org/en/latest/).
- Preconfigured [GitHub Actions](https://github.com/features/actions) workflow for CI.
- Documentation deployment on [GitHub Pages](https://pages.github.com/).
- [Dependabot](https://docs.github.com/en/code-security/dependabot) support for dependency updates.

## Usage
Expand Down

0 comments on commit 9eeb8df

Please # to comment.