Merge pull request #73 from 4lysson-a/dev #26
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Back4app deploy | |
on: | |
push: | |
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://raw.githubusercontent.com/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: Update applicationId in .parse.local | |
run: | | |
cd backend | |
# check if .parse.local file exists | |
if [ ! -f .parse.local ]; then | |
echo "Error: .parse.local file not found" | |
exit 1 | |
fi | |
# 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: cd backend && b4a deploy |