-
Notifications
You must be signed in to change notification settings - Fork 3
34 lines (31 loc) · 1.34 KB
/
publish-website.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: publish-website
on:
# Trigger the workflow on push to main branch
push:
branches:
- main
workflow_dispatch:
permissions:
contents: write
jobs:
build:
# uses: ProjectPythia/cookbook-actions/.github/workflows/build-book.yaml@main
# until https://github.com/ProjectPythia/cookbook-actions/pull/65 is merged
# FIXME: I keep running into this annoying issue that I cannot use a PR to an existing public workflow. Very frustrating
# uses: jbusecke/cookbook-actions/.github/workflows/build-book.yaml@patch-4
# So the only way to fix this rn is to manually copy the PR content here and reference it locally. Silly.
uses: ./.github/workflows/build-book.yaml
with:
environment_file: 'website/environment.yml'
environment_name: chaosbench-docs-env
path_to_notebooks: 'website'
build_command: 'cp -r ../README.md ../docs .; jupyter-book build .'
# this is a bit hacky, but the only way to 'inject' a shell command before the build.
output_path: '_build/html'
deploy:
needs: build
#Trying this out to see if the auth problem is fixed
# uses: ./.github/workflows/deploy-book.yaml #hack until https://github.com/ProjectPythia/cookbook-actions/pull/45 is merged.
uses: ProjectPythia/cookbook-actions/.github/workflows/deploy-book.yaml@main
with:
publish_dir: "website/_build/html"