Merge pull request #971 from serenity-kit/comment-permissions #179
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Deploy Production" | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy-production-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.production.toml | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | |
deploy-production-frontend: | |
runs-on: ubuntu-latest | |
environment: production | |
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:production | |
- 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 |