forked from NatLabRockies/WETOStack
-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (71 loc) · 2.3 KB
/
deploy-pages.yaml
File metadata and controls
77 lines (71 loc) · 2.3 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: deploy-pages
on:
push:
branches:
- main
# paths:
# - docs/**
schedule:
# https://crontab.guru/#00_00_*_*_2,4,6
# "At 00:00 on Tuesday, Thursday, and Saturday."
# Time zone for GitHub is UTC, so adjust accordingly; -6 in the summer, -7 in the winter.
# Therefore, this runs at 6:00 PM Mountain Time on Monday, Wednesday, and Friday.
- cron: '00 00 * * 2,4,6'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
# This job installs dependencies, builds the site, and pushes it to `gh-pages`
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
sudo apt-get install graphviz graphviz-dev
pip install --upgrade pip
pip install -r requirements.txt
# Build the Vue app first, and then move it to the docs/_static folder so that it's included
# in the JupyterBook build.
- name: Build the Vue app
working-directory: ${{runner.workspace}}/WETOStack/entry_guide
run: |
npm install
npm run build
mv dist ../docs/_static/entry_guide
- name: Build the JupyterBook
working-directory: ${{runner.workspace}}/WETOStack/docs/
run: |
jupyter-book build .
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ${{runner.workspace}}/WETOStack/docs/_build/html
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4