Skip to content

Commit

Permalink
only deploy backend
Browse files Browse the repository at this point in the history
  • Loading branch information
codekansas committed Dec 2, 2024
1 parent 04a24dc commit f167130
Showing 1 changed file with 0 additions and 51 deletions.
51 changes: 0 additions & 51 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,57 +14,6 @@ concurrency:
cancel-in-progress: true

jobs:
frontend:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "20"

- name: Restore cache
id: restore-cache
uses: actions/cache/restore@v3
with:
path: |
node_modules/
key: deploy-${{ github.event.pull_request.base.sha || github.sha }}
restore-keys: |
deploy-
- name: Install Node package
working-directory: frontend
run: |
npm install
- name: Write .env.production
working-directory: frontend
run: |
echo "VITE_APP_BACKEND_URL=https://api.kscale.dev" >> .env.production
echo "VITE_STRIPE_PUBLISHABLE_KEY=${{ secrets.VITE_STRIPE_PUBLISHABLE_KEY }}" >> .env.production
- name: Build frontend
run: |
npm run build
working-directory: frontend

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- name: Replace S3 bucket contents
run: |
aws s3 rm s3://${{ secrets.AWS_FRONTEND_S3_BUCKET }} --recursive
aws s3 cp frontend/dist s3://${{ secrets.AWS_FRONTEND_S3_BUCKET }} --recursive
aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION_ID }} --paths "/*"
backend:
runs-on: ubuntu-latest

Expand Down

0 comments on commit f167130

Please sign in to comment.