Skip to content

Deploy application on scalingo #31

Deploy application on scalingo

Deploy application on scalingo #31

name: Deploy application on scalingo
on:
workflow_call:
inputs:
tag:
type: string
required: true
environment:
type: string
required: true
workflow_dispatch:
inputs:
tag:
type: string
required: true
environment:
type: string
required: true
jobs:
deploy:
runs-on: ubuntu-latest
environment: ${{inputs.environment}}
steps:
- uses: actions/checkout@v3
- name: Debug env
run: env
- name: Download web artifact
uses: actions/download-artifact@v3
with:
name: web-scalingo-${{ inputs.tag }}
- name: Download api artifact
uses: actions/download-artifact@v3
with:
name: api-scalingo-${{ inputs.tag }}
- name: Install scalingo CLI
run: |
wget -qO- https://cli-dl.scalingo.com/install.sh | bash
echo "$HOME/bin" >> $GITHUB_PATH
- name: Login to scalingo
run: scalingo login --api-token ${{ secrets.SCALINGO_API_TOKEN }}
- name: Deploy web
run: |
echo "Deploying webapp on app ${{ vars.SCALINGO_APP_NAME }}"
scalingo --app ${{ vars.SCALINGO_APP_NAME }} deploy web-scalingo.tar.gz
- name: Deploy api
run: |
echo "Deploying API on app ${{ vars.SCALINGO_API_APP_NAME }}"
scalingo --app ${{ vars.SCALINGO_API_APP_NAME }} deploy api-scalingo.tar.gz