Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 24 additions & 13 deletions .github/workflows/build-ui.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Workflow for deploying static content to GitHub Pages
name: Deploy scanner-ui to GitHub Pages
name: GitHub Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
# Allows you to run this workflow manually from the Actions tab
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
Expand All @@ -22,17 +23,12 @@ concurrency:
cancel-in-progress: false

jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v5
- uses: pnpm/action-setup@v4
with:
version: 9
Expand All @@ -46,11 +42,26 @@ jobs:
run: pnpm install
- name: Build app
run: pnpm run build
- name: Upload artifact

- name: Setup Pages
if: github.ref == 'refs/heads/main'
uses: actions/configure-pages@v5

- name: Upload Artifact
if: github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: './dist'

deploy:
if: github.ref == 'refs/heads/main'
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4