Skip to content

Dockerize Nextjs

Dockerize Nextjs #219

Workflow file for this run

name: πŸš€ Deploy
on:
push:
branches:
- main
# TODO: Remove me when merge to main
pull_request:
branches:
- main
jobs:
web:
runs-on: ubuntu-latest
steps:
- name: πŸ” Checkout
uses: actions/checkout@v4
- name: πŸ“¦ Setup pnpm
uses: pnpm/action-setup@v4
- name: 🐒 Setup node
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
cache-dependency-path: ./pnpm-lock.yaml
- name: πŸ“¦ Install dependencies
run: pnpm install --frozen-lockfile
- name: πŸͺ° Setup Fly
uses: superfly/flyctl-actions/setup-flyctl@master
- name: πŸš€ Deploy
run: flyctl deploy --config apps/web/fly.toml --dockerfile apps/web/Dockerfile --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
api:
runs-on: ubuntu-latest
# TODO: Remove me when merge to main
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- name: πŸ” Checkout
uses: actions/checkout@v4
- name: πŸ“¦ Setup pnpm
uses: pnpm/action-setup@v4
- name: 🐒 Setup node
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
cache-dependency-path: ./pnpm-lock.yaml
- name: πŸ“¦ Install dependencies
run: pnpm install --frozen-lockfile
- name: πŸͺ° Setup Fly
uses: superfly/flyctl-actions/setup-flyctl@master
- name: πŸš€ Deploy
run: flyctl deploy --config apps/api/fly.toml --dockerfile apps/api/Dockerfile --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}