Skip to content

Commit

Permalink
Add automation
Browse files Browse the repository at this point in the history
  • Loading branch information
pkatarzynski committed Oct 29, 2024
1 parent 5811e4e commit b59c45a
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: CI

concurrency:
group: ${{ github.repository }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
push:
branches: [main]
pull_request:

jobs:
DeployDocs:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
with:
submodules: false
- name: Install dependencies
run: |
sudo apt-get install libjs-mathjax
pip install -r documentation/requirements.txt
- name: Build docs and static demo
run: |
cd documentation
PYTHONPATH="/tmp/" make html
- uses: actions/upload-artifact@v3
with:
name: gh-page
path: documentation/build/html
- name: Deploy to Github Pages
if: github.event_name != 'pull_request'
run: |
cd documentation/build/html
touch .nojekyll
git init
cp ../../../.git/config ./.git/config
git add .
git config --local user.email "BuildTheDocs@GitHubActions"
git config --local user.name "GitHub Actions"
git commit -am "update ${{ github.sha }}"
git push -u origin +HEAD:gh-pages
1 change: 1 addition & 0 deletions documentation/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
# If you need to add extensions just add to those lists
extensions = default_extensions
extensions.append("sphinx_inline_tabs")
extensions.append("sphinx.ext.mathjax")
myst_enable_extensions = default_myst_enable_extensions

myst_substitutions = {"project": project}
Expand Down

0 comments on commit b59c45a

Please sign in to comment.