Skip to content

feat: Update deploy-backend.yml to include app name in b4a deploy com… #6

feat: Update deploy-backend.yml to include app name in b4a deploy com…

feat: Update deploy-backend.yml to include app name in b4a deploy com… #6

name: Back4app deploy
on:
push:
branches:
- dev
tags:
- 'v**'
- '!v**-alpha'
- '!v**-beta'
- '!v**-rc'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Access backend folder
run: cd backend
- name: Install dependencies
run: curl https://github.com/raw/back4app/parse-cli/back4app/installer.sh | sudo /bin/bash
- name: Auth with your back4app account
run: echo ${{ secrets.BACK4APP_ACCOUNT_KEY }} | b4a configure accountkey
- name: Install jq
run: sudo apt-get update && sudo apt-get install -y jq
- name: Update applicationId in .parse.local
run: |
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 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
run: b4a deploy ${{ secrets.BACK4APP_APP_NAME }}