Skip to content

fix fly deployment #194

fix fly deployment

fix fly deployment #194

Workflow file for this run

name: "Deploy Staging"
on:
push:
branches:
- main
- upgrade-prisma
jobs:
deploy-staging-api:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3 # needed until 18 becomes the default
with:
node-version: 18
cache: yarn
- name: Install node-gyp # needed for apollo server
run: yarn global add node-gyp
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build
working-directory: ./apps/backend
run: yarn build
- uses: superfly/flyctl-actions/setup-flyctl@master
- name: Deploy
working-directory: ./apps/backend
run: flyctl deploy --remote-only --config ./fly.staging.toml
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
deploy-staging-frontend:
runs-on: ubuntu-latest
environment: staging
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3 # needed until 18 becomes the default
with:
node-version: 18
cache: yarn
- name: Install node-gyp # needed for apollo server
run: yarn global add node-gyp
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build
working-directory: ./apps/app
run: yarn build:web:staging
- name: Deploy to Netlify
uses: nwtgck/actions-netlify@v2
with:
publish-dir: "./apps/app/web-build"
production-branch: main
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "Deploy from GitHub Actions"
enable-pull-request-comment: false
enable-commit-comment: false
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 7