-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (42 loc) · 1.44 KB
/
deploy.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: deploy
on:
# Trigger the workflow on push to main branch
push:
branches:
- main
# This job installs dependencies, build the book, and pushes it to `gh-pages`
jobs:
build-and-deploy-book:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Conda environment with Micromamba
uses: mamba-org/provision-with-micromamba@main
with:
environment-file: myenv.yml
channel-priority: flexible
channels: conda-forge,defaults,pytorch,nvidia
- name: Install OCP cpu codebase
shell: bash -l {0}
run: |
wget https://raw.githubusercontent.com/Open-Catalyst-Project/ocp/main/env.common.yml
wget https://raw.githubusercontent.com/Open-Catalyst-Project/ocp/main/env.cpu.yml
conda-merge env.common.yml env.cpu.yml > env.yml
mamba env update --file env.yml -n base
# Install OCP repo
- name: Install OCP codebase
shell: bash -l {0}
run: |
git clone https://github.com/Open-Catalyst-Project/ocp.git
(cd ocp && python setup.py develop)
# Build the book
- name: Build the book
shell: bash -l {0}
run: |
jupyter-book build ml-catalysis-tutorials
# Deploy the book's HTML to gh-pages branch
- name: GitHub Pages action
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ml-catalysis-tutorials/_build/html