Merge pull request #19 from SAP-samples/chore/project-update-dependen… #52
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| deploy-pages: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| cache: 'npm' | |
| cache-dependency-path: 'ex0/package-lock.json' | |
| - name: Install and build exercises | |
| run: | | |
| mkdir gh-pages | |
| zip -r gh-pages/mdc.tutorial.zip ex0 -x 'readme.md' -x '*.png' | |
| for dir in ./ex*/; do | |
| mkdir -p gh-pages/"$dir" | |
| cd "$dir" | |
| npm install | |
| npm run build | |
| mv dist ../gh-pages/"$dir" | |
| cd ../ | |
| done | |
| - name: Deploy 🚀 | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| folder: gh-pages |