Skip to content

Commit

Permalink
split stable/develop docs workflow CI
Browse files Browse the repository at this point in the history
  • Loading branch information
n-claes committed Apr 17, 2023
1 parent 5a78e97 commit 81736d6
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 85 deletions.
85 changes: 0 additions & 85 deletions .github/workflows/docs.yml

This file was deleted.

46 changes: 46 additions & 0 deletions .github/workflows/docs_develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: docs

on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]

jobs:
develop:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9

- name: Install dependencies
run: |
python -m pip install --upgrade pip
# Fix version for now, 3.4 throws an error (see #101)
pip install markdown==3.3.7
pip install ford==6.1.13 graphviz
sudo apt-get install graphviz
pip install -U sphinx
pip install numpydoc sphinx-rtd-theme lazy-object-proxy==1.4 sphinx-autoapi
- name: Generate documentation
run: |
cd docs
python generate_docs.py develop
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
# only deploy if the branch is develop
if: ${{ contains(github.ref, 'refs/heads/develop') }}
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
external_repository: n-claes/legolas.science-dev
publish_branch: main
publish_dir: ./docs
cname: dev.legolas.science
enable_jekyll: true
full_commit_message: 'dev: deploy n-claes/legolas@${{ github.sha }}'
46 changes: 46 additions & 0 deletions .github/workflows/docs_stable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: docs

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
stable:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9

- name: Install dependencies
run: |
python -m pip install --upgrade pip
# Fix version for now, 3.4 throws an error (see #101)
pip install markdown==3.3.7
pip install ford==6.1.13 graphviz
sudo apt-get install graphviz
pip install -U sphinx
pip install numpydoc sphinx-rtd-theme lazy-object-proxy==1.4 sphinx-autoapi
- name: Generate documentation
run: |
cd docs
python generate_docs.py stable
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
# only deploy if the branch is master
if: ${{ contains(github.ref, 'refs/heads/master') }}
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY_STABLE }}
external_repository: n-claes/legolas.science-stable
publish_branch: main
publish_dir: ./docs
cname: legolas.science
enable_jekyll: true
full_commit_message: 'stable: deploy n-claes/legolas@${{ github.sha }}'

0 comments on commit 81736d6

Please sign in to comment.