Skip to content

Commit

Permalink
Added github action to make the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathias157 committed Sep 16, 2024
1 parent 74cd5b2 commit cf8ff7e
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Build documentation

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

permissions:
contents: write

jobs:
docs:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- uses: mamba-org/setup-micromamba@v1
with:
micromamba-version: '1.5.8-0' # any version from https://github.com/mamba-org/micromamba-releases
environment-file: environment.yml
init-shell: bash
cache-environment: true
post-cleanup: 'all'
generate-run-shell: false

- name: Sphinx build
run: |
sphinx-build doc _build
shell: bash -el {0}

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
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
9 changes: 9 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: pybalmorel
channels:
- conda-forge
dependencies:
- python=3.9
- myst-parser
- sphinx
- sphinx-rtd-theme
- sphinx-autoapi

0 comments on commit cf8ff7e

Please sign in to comment.