Skip to content

Commit

Permalink
feat: Update deploy-backend.yml to include app name in b4a deploy com…
Browse files Browse the repository at this point in the history
…mand
  • Loading branch information
4lysson-a committed Jul 9, 2024
1 parent 5bca55c commit 42dd051
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/deploy-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Back4app deploy

on:
push:
branches:
- dev
tags:
- 'v**'
- '!v**-alpha'
Expand All @@ -25,12 +27,26 @@ jobs:
- name: Auth with your back4app account
run: echo ${{ secrets.BACK4APP_ACCOUNT_KEY }} | b4a configure accountkey

- name: Update applicationId in parse.local
- name: Install jq
run: sudo apt-get update && sudo apt-get install -y jq

- name: Update applicationId in .parse.local
run: |
# Read applicationId of github secret
cd backend
# Verificar se o arquivo .parse.local existe
if [ ! -f .parse.local ]; then
echo "Error: .parse.local file not found"
exit 1
fi
# Debug: list files in backend dir
ls -al
# read applicationId from .parse.local
applicationId=${{ secrets.APPLICATION_ID }}
# Update the file parse.local with new applicationId
# update applicationId in .parse.local
jq --arg applicationId "$applicationId" '.applications.visualizaai.applicationId = $applicationId' .parse.local > .parse.local.tmp && mv .parse.local.tmp .parse.local
- name: Deploy your app
Expand Down

0 comments on commit 42dd051

Please sign in to comment.