33# - go to the Settings -> Environments tab
44# then select the 'github-pages' environment
55# and make sure the branch of interest (here main) is allowed in the 'Branch protection rules' area
6+ # - also for using a self-hosted runner, make sure you have set it up properly
7+ # github.com/$ORGA -> Settings -> Actions -> Runner groups -> Default Group -> Allow public repositories
68
79name : Deploy MyST to GitHub Pages
810
@@ -20,40 +22,51 @@ permissions:
2022 contents : read
2123 pages : write
2224 id-token : write
25+
2326# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
2427# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
2528concurrency :
2629 group : " pages"
2730 cancel-in-progress : false
2831
29-
30- # this is no longer needed as we serve from info-mines.paris
31- # required for MyST
32+ # this is no longer needed as we serve from hostnames
33+ # in our own domain info-mines.paris
3234# env:
33- # # `BASE_URL` determines the website is served from, including CSS & JS assets
34- # # You may need to change this to `BASE_URL: ''`
3535# BASE_URL: /${{ github.event.repository.name }}
3636
3737
3838jobs :
3939 build-and-deploy :
40- runs-on : ubuntu-latest
40+ runs-on : self-hosted
41+ container :
42+ image : dockerhub.pl.sophia.inria.fr/python-nodejs:latest
43+ # this is so we can use source
44+ defaults :
45+ run :
46+ shell : bash
4147 steps :
4248 - name : Checkout repository
43- uses : actions/checkout@v4
44- - uses : actions/setup-node@v4
45- with :
46- node-version : 24
49+ uses : actions/checkout@v5
50+ - name : " Python venv & requirements.txt"
51+ run : |
52+ python3 -m venv venv
53+ source venv/bin/activate
54+ if [ -f requirements.txt ]; then
55+ pip install -r requirements.txt
56+ fi
4757 - name : Install MyST Markdown
48- run : npm install -g mystmd
49- - name : Install requirements.txt
50- run : " if [ -f requirements.txt ]; then pip install -r requirements.txt; fi "
58+ run : |
59+ source venv/bin/activate
60+ npm install mystmd thebe-core thebe thebe-lite
5161 - name : Build HTML Assets
52- run : (cd notebooks; myst build --execute --html)
62+ run : |
63+ source venv/bin/activate
64+ cd notebooks
65+ npx myst build --execute --html
5366 - name : Setup Pages
54- uses : actions/configure-pages@v3
67+ uses : actions/configure-pages@v5
5568 - name : Upload artifact
56- uses : actions/upload-pages-artifact@v3
69+ uses : actions/upload-pages-artifact@v4
5770 with :
5871 path : ' ./notebooks/_build/html'
5972 - name : Deploy to GitHub Pages
0 commit comments