Skip to content

Commit

Permalink
feat: added automatic deployment script
Browse files Browse the repository at this point in the history
  • Loading branch information
nroh555 committed Oct 20, 2024
1 parent 64987f1 commit a0f2dc3
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/deploy.staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Fly Deploy Staging

on:
push:
branches:
- main

jobs:
deploy-web:
name: Deploy Web
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only --config fly.staging.toml --build-secret VITE_FIREBASE_PROJECT_ID=${{ secrets.VITE_FIREBASE_PROJECT_ID }} --build-secret VITE_REACT_APP_API_KEY=${{ secrets.VITE_REACT_APP_API_KEY }} --build-secret VITE_REACT_APP_AUTH_DOMAIN=${{ secrets.VITE_REACT_APP_AUTH_DOMAIN }} --build-secret VITE_REACT_APP_STORAGE_BUCKET=${{ secrets.VITE_REACT_APP_STORAGE_BUCKET }} --build-secret VITE_REACT_APP_MESSAGING_SENDER_ID=${{ secrets.VITE_REACT_APP_MESSAGING_SENDER_ID }} --build-secret VITE_REACT_APP_APP_ID=${{ secrets.VITE_REACT_APP_APP_ID }} --build-secret VITE_REACT_APP_MEASUREMENT_ID=${{ secrets.VITE_REACT_APP_MEASUREMENT_ID }}
working-directory: ./frontend
env:
FLY_API_TOKEN: ${{ secrets.FLY_STAGING_API_TOKEN }}

deploy-api:
name: Deploy Api
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only --config fly.staging.toml
working-directory: ./backend
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_STAGING_API_TOKEN }}
2 changes: 0 additions & 2 deletions frontend/Dockerfile.staging
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ ARG VITE_REACT_APP_STORAGE_BUCKET
ARG VITE_REACT_APP_MESSAGING_SENDER_ID
ARG VITE_REACT_APP_APP_ID
ARG VITE_REACT_APP_MEASUREMENT_ID
ARG VITE_CLERK_PUBLISHABLE_KEY

ENV VITE_FIREBASE_PROJECT_ID=${VITE_FIREBASE_PROJECT_ID}
ENV VITE_REACT_APP_API_KEY=${VITE_REACT_APP_API_KEY}
Expand All @@ -43,7 +42,6 @@ ENV VITE_REACT_APP_STORAGE_BUCKET=${VITE_REACT_APP_STORAGE_BUCKET}
ENV VITE_REACT_APP_MESSAGING_SENDER_ID=${VITE_REACT_APP_MESSAGING_SENDER_ID}
ENV VITE_REACT_APP_APP_ID=${VITE_REACT_APP_APP_ID}
ENV VITE_REACT_APP_MEASUREMENT_ID=${VITE_REACT_APP_MEASUREMENT_ID}
ENV VITE_CLERK_PUBLISHABLE_KEY=${VITE_CLERK_PUBLISHABLE_KEY}

# Set server URL
ENV VITE_REACT_APP_SERVER_URL="https://wdcc-vps-api-staging.fly.dev"
Expand Down

0 comments on commit a0f2dc3

Please sign in to comment.