1- name : Build HTML
2-
1+ # https://mystmd.org/guide/deployment-github-pages
2+ name : MyST GitHub Pages Deploy
33on :
44 push :
5- branches : [ "main" ]
6- pull_request :
7- branches : [ "main" ]
8- workflow_dispatch :
9-
10- # https://github.com/actions/starter-workflows/blob/55eb18560f57898549b12afa6defe7cc79705d6a/pages/static.yml#L13
5+ # Runs on pushes targeting the default branch
6+ branches : [main]
7+ env :
8+ # `BASE_URL` determines the website is served from, including CSS & JS assets
9+ # You may need to change this to `BASE_URL: ''`
10+ BASE_URL : /${{ github.event.repository.name }}
11+
12+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
1113permissions :
1214 contents : read
1315 pages : write
1416 id-token : write
15-
17+ # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
18+ # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
1619concurrency :
17- group : " pages"
20+ group : ' pages'
1821 cancel-in-progress : false
19-
2022jobs :
21- build :
23+ deploy :
24+ environment :
25+ name : github-pages
26+ url : ${{ steps.deployment.outputs.page_url }}
2227 runs-on : ubuntu-latest
23-
2428 steps :
2529 - uses : actions/checkout@v4
26-
27- # https://github.com/actions/starter-workflows/blob/main/pages/mdbook.yml
2830 - name : Setup Pages
29- id : pages
30- uses : actions/configure-pages@v5
31-
32- # https://mystmd.org/guide/deployment-github-pages#fn-except-custom-domains
33- - name : Install dependencies and build page
34- run : |
35- chmod +x build_html.sh
36- ./build_html.sh
37-
38- # https://jupyterbook.org/en/stable/publish/gh-pages. html
31+ uses : actions/configure- pages@v3
32+ - uses : actions/setup-node@v4
33+ with :
34+ node-version : 18.x
35+ - name : Install MyST Markdown
36+ run : npm install -g mystmd
37+ - name : Build HTML Assets
38+ run : |
39+ cd docs
40+ myst build -- html
3941 - name : Upload artifact
4042 uses : actions/upload-pages-artifact@v3
4143 with :
42- path : " _build/html"
43-
44- # Deployment job
45- deploy :
46- environment :
47- name : github-pages
48- url : ${{ steps.deployment.outputs.page_url }}
49- runs-on : ubuntu-latest
50- needs : build
51- steps :
44+ path : ' ./docs/_build/html'
5245 - name : Deploy to GitHub Pages
5346 id : deployment
5447 uses : actions/deploy-pages@v4
0 commit comments