Skip to content

chore: deploy review apps regardless ci #2

chore: deploy review apps regardless ci

chore: deploy review apps regardless ci #2

Workflow file for this run

name: Deploy Review App
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
deploy-review-app:
name: Deploy Review App
runs-on: ubuntu-latest
# We want this to run even if other jobs fail
if: always()
steps:
- uses: actions/checkout@v4
- name: Install Scalingo CLI
uses: ./.github/actions/scalingo-cli
- name: Add scalingo to known hosts
run: echo "KNOWN_HOSTS=$(ssh-keyscan -H ssh.osc-fr1.scalingo.com)" >> $GITHUB_ENV
- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.PRIVATE_SSH_KEY }}
name: id_rsa
known_hosts: ${{ env.KNOWN_HOSTS }}
if_key_exists: fail
- name: Deploy Review App
env:
SCALINGO_API_TOKEN: ${{ secrets.SCALINGO_API_TOKEN }}
SCALINGO_APP: ecobalyse
SCALINGO_REGION: ${{ secrets.SCALINGO_REGION }}
run: |
# Create/deploy review app using Scalingo CLI
scalingo --app $SCALINGO_APP review-app create ${{ github.event.pull_request.number }}