Skip to content

Update FluentyClient.tsx #239

Update FluentyClient.tsx

Update FluentyClient.tsx #239

Workflow file for this run

name: Deploy
on:
push:
branches:
- main
workflow_dispatch:
inputs:
run_tests:
description: Run test suite before deploying
type: boolean
default: true
repository_dispatch:
types: [on-millennium-sdk-updated]
permissions:
checks: write
contents: read
pull-requests: write
jobs:
build_test_and_deploy:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Bun
uses: oven-sh/setup-bun@v2
- name: Authenticate SteamBrew
run: |
echo "$FIREBASE_CREDENTIALS" | base64 -d > ./apps/www/credentials.json
echo "$BEARER" > ./apps/www/.env
env:
FIREBASE_CREDENTIALS: ${{ secrets.FIREBASE_CREDENTIALS }}
BEARER: ${{ secrets.BEARER }}
- name: Install and build docs
working-directory: apps/docs
run: bun install --frozen-lockfile && bun run build
- name: Install www dependencies
working-directory: apps/www
run: bun install --frozen-lockfile
- name: Build www
working-directory: apps/www
run: bun run build
- name: Install Playwright browsers
if: ${{ inputs.run_tests != false }}
working-directory: apps/www
run: bunx playwright install --with-deps chromium
- name: Start production server
if: ${{ inputs.run_tests != false }}
working-directory: apps/www
run: bun run start &
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Wait for server
if: ${{ inputs.run_tests != false }}
run: until curl -sf http://localhost:3000 > /dev/null; do sleep 2; done
timeout-minutes: 2
- name: Run tests
if: ${{ inputs.run_tests != false }}
working-directory: apps/www
run: bun run test
- name: Upload Playwright report
if: ${{ inputs.run_tests != false && always() }}
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: apps/www/playwright-report/
retention-days: 7
- name: Set up SSH
uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Add server to known hosts
run: ssh-keyscan -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts
- name: Sync www
run: |
rsync -az --delete \
apps/www/.next apps/www/public apps/www/package.json apps/www/.env \
ubuntu@${{ secrets.SSH_HOST }}:~/net/steambrew/www/
- name: Sync docs
run: |
rsync -az --delete \
apps/docs/.vitepress/dist/ \
ubuntu@${{ secrets.SSH_HOST }}:~/net/steambrew/docs/
- name: Install deps and swap
run: |
ssh ubuntu@${{ secrets.SSH_HOST }} "cd ~/net/steambrew/www && ~/.bun/bin/bun install --production --silent"
ssh ubuntu@${{ secrets.SSH_HOST }} "bash ~/net/steambrew/swap.sh"