Skip to content

Commit

Permalink
Merge pull request #73 from naik-aakash/doc_deployment_wf
Browse files Browse the repository at this point in the history
Add docs deployment to ci
  • Loading branch information
JaGeo authored Oct 22, 2024
2 parents f2cd946 + c187747 commit 62d58a2
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: build-docs

on:
workflow_dispatch:
push:
branches: [ main ]
release:
types: [ published ]

# set GITHUB_TOKEN permissions to allow deployment to GitHub Pages
permissions:
contents: write

jobs:
docs:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0} # enables conda/mamba env activation by reading bash profile

env:
PYTHON_VERSION: "3.10"

steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Set up micromamba
uses: mamba-org/setup-micromamba@main
- name: Create mamba environment
run: |
micromamba create -n autoplex_docs python=$PYTHON_VERSION --yes
- name: Install uv
run: micromamba run -n autoplex_docs pip install uv
- name: Install autoplex and dependencies
run: |
micromamba activate autoplex_docs
uv pip install --upgrade pip
uv pip install .[docs,strict]
- name: Build
run: micromamba run -n autoplex_docs sphinx-build -W docs _build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/
force_orphan: true

0 comments on commit 62d58a2

Please sign in to comment.