Re-establish frontend for OpenScan3 firmware #18
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: Build SPA | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - "main" | |
| # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
| permissions: | |
| contents: write | |
| pages: write | |
| id-token: write | |
| # Allow one concurrent deployment | |
| concurrency: | |
| group: "build" | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Install Dependencies | |
| run: | | |
| npm install -g @quasar/cli | |
| cd app | |
| npm install --include=dev | |
| - name: Build SPA | |
| run: | | |
| cd app | |
| quasar build | |
| - name: Copy output | |
| id: copy | |
| run: | | |
| NOW=$(date +"%Y-%m-%d-%H%M") | |
| IMAGE=$NOW-openscan-client | |
| cd app/dist/spa/ | |
| zip -qr $IMAGE.zip * | |
| cd ../../.. | |
| mv app/dist/spa/$IMAGE.zip $IMAGE.zip | |
| echo "::set-output name=image::$IMAGE" | |
| - name: Publish relese | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: ${{ steps.copy.outputs.image }} | |
| files: ${{ steps.copy.outputs.image }}.zip | |
| dispatch: | |
| needs: build | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Repository Dispatch | |
| uses: peter-evans/repository-dispatch@v2 | |
| with: | |
| token: ${{ secrets.REPO_ACCESS_TOKEN }} | |
| repository: OpenScan-org/OpenScan3-Image | |
| event-type: client-release |