Skip to content

PLAT-13621 Removing all npx references on the documentation and Updat… #15

PLAT-13621 Removing all npx references on the documentation and Updat…

PLAT-13621 Removing all npx references on the documentation and Updat… #15

Workflow file for this run

name: build-deploy
on:
push:
branches:
- develop
tags:
- "[0-9]+.[0-9]+"
jobs:
set_environment:
outputs:
my_env: ${{ steps.setenv.outputs.my_env }}
runs-on: ubuntu-latest
steps:
- id: setenv
run: |
if [ $GITHUB_REF_NAME == develop ]; then
echo "my_env=staging" >> $GITHUB_OUTPUT
fi
if [ "${{ github.event.client_payload.deployment_branch }}" == "master" ]; then
echo "my_env=Production" >> $GITHUB_OUTPUT
fi
if [[ $GITHUB_REF_NAME =~ ^[0-9]+\.[0-9]+$ ]]; then
echo "release tag: $GITHUB_REF_NAME"
echo "my_env=production" >> $GITHUB_OUTPUT
fi
release:
runs-on: ubuntu-latest
needs: set_environment
environment:
name: ${{ needs.set_environment.outputs.my_env }}
name: ${{ needs.set_environment.outputs.my_env }}-release
steps:
- name: Generate Heroku Config
run: |
cat <<EOF > ~/.netrc
machine api.heroku.com
login ${{ secrets.HEROKU_EMAIL }}
password ${{ secrets.HEROKU_API_TOKEN }}
machine git.heroku.com
login ${{ secrets.HEROKU_EMAIL }}
password ${{ secrets.HEROKU_API_TOKEN }}
EOF
- name: release modules
run: |
heroku config:set MODULES_REPO_BRANCH=$GITHUB_REF_NAME -a ${{ secrets.HEROKU_APP }}
heroku run 'python manage.py update_crowdbotics_components --quiet --no-input --no-log-file --public' --size=standard-2x -a ${{ secrets.HEROKU_APP }}