Skip to content
Open
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
90 changes: 90 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: deploy

on:
workflow_dispatch:

pull_request:
types:
- opened
- synchronize
- reopened
- closed

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: true

jobs:
test:
if: github.event.pull_request.merged == false
runs-on: ubuntu-latest

defaults:
run:
working-directory: launchpad

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: launchpad/package-lock.json

- name: Install dependencies
run: npm ci

- name: Build website
run: npm run build

- name: Run tests
run: npm run test

- run: bash scripts/report.sh
env:
BOARD_URL: ${{ vars.BOARD_URL }}
SHIPIT_TOKEN: ${{ secrets.SHIPIT_TOKEN }}

deploy:
needs: test
if: always() && github.event.pull_request.merged == true
runs-on: ubuntu-latest

defaults:
run:
working-directory: launchpad

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: launchpad/package-lock.json

- name: Install dependencies
run: npm ci

- name: Build website
run: npm run build
env:
VITE_BOARD_URL: ${{ vars.BOARD_URL }}

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: launchpad/dist

- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4