Deploy documentation #103
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy documentation | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
schedule: | |
- cron: "0 9 * * 1,3,5" | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
build-and-deploy: | |
concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession. | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
pip install sphinx pydata-sphinx-theme seaborn ipython | |
pip install rpy2 | |
pip install --editable . | |
- name: Set up R | |
uses: r-lib/actions/setup-r@v2 | |
- name: Install R packages | |
run: | | |
install.packages(c('glmnet', 'kde1d', 'TSP', 'VineCopula')) | |
shell: Rscript {0} | |
- name: Sphinx build | |
run: | | |
sphinx-build doc _build | |
- name: Deploy 🚀 | |
uses: JamesIves/github-pages-deploy-action@v4 | |
if: ${{ github.event_name == 'workflow_dispatch' }} | |
with: | |
folder: _build # The folder the action should deploy. | |
branch: gh-pages |