Update online-use-cases-static.html #103
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
| name: Deploy to Github Pages | |
| on: | |
| push: | |
| workflow_dispatch: | |
| inputs: | |
| wizard_branch: | |
| description: 'Ebrain-Wizard branch' | |
| required: true | |
| default: 'main' | |
| jobs: | |
| build-wizard: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/[email protected] | |
| with: | |
| repository: lbologna/bsp-usecase-wizard | |
| ref: ${{ github.event.inputs.wizard_branch }} | |
| - name: Run tests | |
| run: | | |
| echo "Branch ${{ github.event.inputs.wizard_branch }}" | |
| npm install | |
| npm run validate | |
| npm run test | |
| - name: Build for CLS | |
| run: | | |
| BASE_URL="/static/wizard" \ | |
| CALLBACK_URL="/online-use-cases.html" \ | |
| USE_PROD_OFFSET='True' \ | |
| npm run build | |
| cp public/service-worker.js public/build | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: wizard-cls | |
| path: public/build/* | |
| integrate-wizard: | |
| needs: build-wizard | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/[email protected] | |
| - name: Fetch artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: wizard-cls | |
| path: static/wizard | |
| - name: Deploy gh-pages | |
| uses: JamesIves/[email protected] | |
| with: | |
| branch: gh-pages | |
| folder: . |