Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Actions Configuration to run and deploy the documentation #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: deploy

on:
push:
branches: [master,test-flow]

repository_dispatch:
types: [setups-docs]

defaults:
run:
shell: bash -l {0}

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

steps:
- name: Setup the tardis-setups repository
uses: actions/checkout@v3
with:
path: setups

- name: Setup the tardis repository
uses: actions/checkout@v3
with:
repository: tardis-sn/tardis
path: tardis

- name: Setup environment
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
miniforge-version: latest
activate-environment: tardis
auto-activate-base: false
use-mamba: true

- name: Create the environment
run: |
cd tardis/
mamba update --name tardis --file conda-linux-64.lock

- name: Setup Tardis
run: |
cd tardis/
pip install -e .

- name: Install Sphinx Gallery
run: |
mamba install -n tardis sphinx-gallery

- name: Create the documentation
run: |
cd setups/
sphinx-build -b html docs/ html/ -P

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./setups/html
publish_branch: gh-pages