Skip to content

Commit bbbaef5

Browse files
author
Murilo Marinho
committed
Add workflow to build html
1 parent 31c934a commit bbbaef5

File tree

2 files changed

+42
-7
lines changed

2 files changed

+42
-7
lines changed

.github/workflows/build_html.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Build HTML
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
14+
# https://github.com/actions/starter-workflows/blob/55eb18560f57898549b12afa6defe7cc79705d6a/pages/static.yml#L13
15+
permissions:
16+
contents: read
17+
pages: write
18+
id-token: write
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
# https://mystmd.org/guide/deployment-github-pages#fn-except-custom-domains
24+
- name: Install dependencies and build page
25+
run: |
26+
chmod +x build_html.sh
27+
./build_html.sh
28+
29+
# https://jupyterbook.org/en/stable/publish/gh-pages.html
30+
- name: Upload artifact
31+
uses: actions/upload-pages-artifact@v3
32+
with:
33+
path: "_build/html"
34+
35+
# https://github.com/actions/deploy-pages/issues/305
36+
- name: Configure Pages
37+
uses: actions/configure-pages@v4
38+
- name: Deploy to GitHub Pages
39+
id: deployment
40+
uses: actions/deploy-pages@v4

build_html.sh

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
#!/bin/bash
22

3-
# While 2.0 is not stable
4-
python -m pip install jupyter-book --pre
5-
6-
# Otherwise the links will not be correctly set up for th webpage
3+
python -m pip install mystmd
74
export BASE_URL="https://smartarmstack.github.io"
8-
9-
# Build page
10-
python -m jupyter book build --html
5+
myst build --html
116

0 commit comments

Comments
 (0)