Skip to content

docker ignore

docker ignore #23

Workflow file for this run

name: 🚀 Deploy
on:
push:
branches:
- development
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
actions: write
contents: read
jobs:
lint:
name: ⬣ ESLint
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
- name: ⎔ Setup node
uses: actions/setup-node@v4
with:
cache: npm
cache-dependency-path: ./package.json
node-version: 20
- name: 📥 Install deps
run: npm install
- name: 🔬 Lint
run: npm run lint
deploy:
name: 🚀 Deploy
runs-on: ubuntu-latest
needs: [lint]
# only deploy main/development branch on pushes
if: ${{ (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/development') && github.event_name == 'push' }}
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
- name: 👀 Read app name
uses: SebRollen/toml-action@v1.2.0
id: app_name
with:
file: fly.toml
field: app
- name: 🎈 Setup Fly
uses: superfly/flyctl-actions/setup-flyctl@1.5
- name: 🚀 Deploy development
if: ${{ github.ref == 'refs/heads/development' }}
run: flyctl deploy --remote-only --app ${{ steps.app_name.outputs.value }}-development
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
- name: 🚀 Deploy Production
if: ${{ github.ref == 'refs/heads/main' }}
run: flyctl deploy --remote-only --build-arg COMMIT_SHA=${{ github.sha }} --app ${{ steps.app_name.outputs.value }}
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}