Skip to content

Commit

Permalink
chore: add deploy docs action
Browse files Browse the repository at this point in the history
  • Loading branch information
lepture committed Jul 29, 2023
1 parent 15af739 commit 9016170
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Deploy docs to Pages

on:
push:
branches:
- master

workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true

jobs:
build:
name: build docs
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm ci
- run: npm run build

- uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Setup Pages
uses: actions/configure-pages@v3

- name: install package
run: python -m pip install .

- name: install deps
run: python -m pip install -r docs/requirements.txt

- name: build docs
run: sphinx-build docs _site -b dirhtml

- name: Upload artifact
uses: actions/upload-pages-artifact@v1

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest
needs: build

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1

0 comments on commit 9016170

Please sign in to comment.