Skip to content

Deploy Release Build to GitHub pages #147

Deploy Release Build to GitHub pages

Deploy Release Build to GitHub pages #147

name: Deploy Release Build to GitHub pages
on:
push:
branches:
- 'main'
tags:
- '**'
workflow_dispatch:
permissions:
contents: read
id-token: write
concurrency:
group: 'pages'
cancel-in-progress: true
defaults:
run:
working-directory: ./apps/client
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22]
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm run build
env:
VITE_GROWTH_BOOK_KEY: ${{ secrets.VITE_GROWTH_BOOK_KEY }}
- name: Upload static files as artifact
id: deployment
uses: actions/upload-artifact@v4
with:
name: github-pages
path: ./dist
if-no-files-found: error
deploy:
permissions:
pages: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: github-pages
path: .
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4