1+ # Sample workflow for deploying a Jekyll site to GitHub Pages
2+ name : GitHub pages deployment
3+
4+ # Runs on pushes targeting the default branch
5+ on :
6+ push :
7+ branches : ["main"]
8+
9+ # Allows you to run this workflow manually from the Actions tab
10+ workflow_dispatch :
11+
12+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13+ permissions :
14+ contents : read
15+ pages : write
16+ id-token : write
17+
18+ # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
19+ # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
20+ concurrency :
21+ group : " deploy-pages"
22+ cancel-in-progress : false
23+
24+ jobs :
25+ # Build job
26+ build :
27+ name : Build pages site
28+ runs-on : ubuntu-latest
29+ steps :
30+ - name : Checkout
31+ uses : actions/checkout@v4
32+ - name : Setup Pages
33+ uses : actions/configure-pages@v5
34+
35+ - name : Create _site directory
36+ run : mkdir -p ./site/_site
37+
38+ - name : Create notebooks directory
39+ run : mkdir -p ./site/assets/notebooks
40+ - name : Move notebooks into build directory
41+ run : cp -r ./notebooks/* ./site/assets/notebooks/
42+ - name : Move notebook config file into build directory
43+ run : cp -r ./notebooks/notebooks.yml ./site/_data/
44+
45+ - name : Create data directory
46+ run : mkdir -p ./site/assets/data
47+ - name : Move datasets into build directory
48+ run : cp -r ./data/* ./site/assets/data/
49+ - name : Move dataset config file into build directory
50+ run : cp -r ./data/datasets.yml ./site/_data/
51+
52+ - name : Move resources page into build directory
53+ run : cp ./resources.md ./site/
54+
55+ - name : Build with Jekyll
56+ uses : actions/jekyll-build-pages@v1
57+ with :
58+ source : ./site
59+ destination : ./site/_site
60+
61+ - name : Upload artifact
62+ uses : actions/upload-pages-artifact@v3
63+ with :
64+ path : ./site/_site
65+
66+ # Deployment job
67+ deploy :
68+ name : Deploy pages site
69+ environment :
70+ name : github-pages
71+ url : ${{ steps.deployment.outputs.page_url }}
72+ runs-on : ubuntu-latest
73+ needs : build
74+ steps :
75+ - name : Deploy to GitHub Pages
76+ id : deployment
77+ uses : actions/deploy-pages@v4
0 commit comments