-
Notifications
You must be signed in to change notification settings - Fork 6
34 lines (31 loc) · 863 Bytes
/
on-commit.yaml
File metadata and controls
34 lines (31 loc) · 863 Bytes
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
on:
push:
branches:
- main
jobs:
deploy-pages:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: 'npm'
cache-dependency-path: 'u1/ex0/package-lock.json'
- name: Install and build exercises
run: |
mkdir -p gh-pages/u1
zip -r gh-pages/mdc.tutorial.zip u1/ex0 -x 'readme.md' -x '*.png'
for dir in ./u1/ex*/; do
mkdir -p gh-pages/u1/$(basename "$dir")
pushd "$dir"
npm install
npm run build
mv dist ../../gh-pages/u1/$(basename "$dir")
popd
done
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: gh-pages