Skip to content

Commit cb12f07

Browse files
committed
fix: ghpages deployment
1 parent d489f9f commit cb12f07

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

.github/workflows/on-commit.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,18 @@ jobs:
1414

1515
- name: Install and build exercises
1616
run: |
17-
mkdir gh-pages
17+
mkdir -p gh-pages/u1
1818
zip -r gh-pages/mdc.tutorial.zip u1/ex0 -x 'readme.md' -x '*.png'
1919
2020
for dir in ./u1/ex*/; do
21-
mkdir -p gh-pages/u1/"$dir"
22-
cd "$dir"
21+
mkdir -p gh-pages/u1/$(basename "$dir")
22+
pushd "$dir"
2323
npm install
2424
npm run build
25-
mv dist ../gh-pages/u1/"$dir"
26-
cd ../
25+
mv dist ../../gh-pages/u1/$(basename "$dir")
26+
pop
2727
done
28+
2829
- name: Deploy 🚀
2930
uses: JamesIves/github-pages-deploy-action@v4
3031
with:

0 commit comments

Comments
 (0)