Build HTML and Deploy to GH-PAGES #1306
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: Build HTML and Deploy to GH-PAGES | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
push: | |
branches: | |
- main | |
jobs: | |
build-html-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- name: Setup Miniconda | |
uses: conda-incubator/setup-miniconda@v2.2.0 | |
with: | |
auto-update-conda: true | |
auto-activate-base: false | |
miniconda-version: 'latest' | |
environment-file: environment.yml | |
activate-environment: main-conda-env | |
- name: Build Cookbook | |
shell: bash -l {0} | |
run: jb build cookbook/ | |
- name: Deploy 🚀 | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BRANCH: gh-pages | |
FOLDER: cookbook/_build/html | |
CLEAN: true |