Add a dashboard to visualise the Job queue and explore logs #20
Workflow file for this run
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 Dashboard | |
| on: | |
| push: | |
| branches: [master] | |
| paths: ['dashboard/**'] | |
| pull_request: | |
| types: [opened, reopened, synchronize, closed] | |
| paths: ['dashboard/**'] | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| concurrency: pages-${{ github.ref }} | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node | |
| if: github.event.action != 'closed' | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: Install tools | |
| if: github.event.action != 'closed' | |
| run: npm install --no-save purescript@0.15.16 spago@1.0.4 esbuild | |
| - name: Build dashboard | |
| if: github.event.action != 'closed' | |
| run: npm run dashboard:build | |
| - name: Verify bundle | |
| if: github.event.action != 'closed' | |
| run: test -f dashboard/app.js | |
| - name: Prepare deploy directory | |
| if: github.event.action != 'closed' | |
| run: | | |
| mkdir -p _site | |
| cp dashboard/index.html _site/ | |
| cp dashboard/app.js _site/ | |
| cp -r dashboard/static _site/ | |
| - name: Deploy to Pages | |
| if: github.ref == 'refs/heads/master' | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| folder: _site | |
| clean-exclude: pr-preview | |
| # On 'closed' events this removes the preview directory from gh-pages; | |
| # on all other PR events it deploys the build to pr-preview/pr-<number>/. | |
| - name: Deploy PR preview | |
| if: github.event_name == 'pull_request' | |
| uses: rossjrw/pr-preview-action@v1 | |
| with: | |
| source-dir: ./_site/ |