Skip to content

0.0.32 [deploy]

0.0.32 [deploy] #136

Workflow file for this run

name: Deploy to Fly.io
on:
push:
branches: [master]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Debug info
run: |
echo "github.ref = ${{ github.ref }}"
echo "github.ref_type = ${{ github.ref_type }}"
echo "github.event_name = ${{ github.event_name }}"
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 23
- name: Setup pnpm
uses: pnpm/action-setup@v2
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run tests
run: pnpm test
- name: Build
run: pnpm run build && pnpm run build:server && pnpm prune --prod
deploy:
needs: test
runs-on: ubuntu-latest
if: contains(github.event.head_commit.message, '[deploy]')
steps:
- uses: actions/checkout@v3
- name: Get version
id: get_version
run: |
APP_VERSION=$(node -p "require('./package.json').version")
echo "APP_VERSION=${APP_VERSION}" >> $GITHUB_OUTPUT
- name: Setup Fly.io
uses: superfly/flyctl-actions/setup-flyctl@master
- name: Deploy to Fly.io
run: flyctl deploy --remote-only --env APP_VERSION=${{ steps.get_version.outputs.APP_VERSION }}
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}