Skip to content

Merge pull request #1392 from betagouv/change-nom-api #558

Merge pull request #1392 from betagouv/change-nom-api

Merge pull request #1392 from betagouv/change-nom-api #558

name: Deploy - Staging
on:
push:
branches: [master]
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up SSH
run: |
mkdir -p ~/.ssh/
echo "$SSH_PRIVATE_KEY" > ./deploy.key
sudo chmod 600 ./deploy.key
ssh-keyscan -H $SSH_HOST >> ~/.ssh/known_hosts
shell: bash
env:
SSH_PRIVATE_KEY: ${{secrets.SSH_MACHINE_USER_PRIVATE_KEY}}
SSH_HOST: ${{ secrets.SSH_HOST_STAGING }}
- name: Deploy to staging
run: ssh -i ./deploy.key www-data@$SSH_HOST 'sh /opt/apps/www/www-deploy.sh'
env:
SSH_HOST: ${{ secrets.SSH_HOST_STAGING }}