Merge pull request #1370 from betagouv/20240827_change_AgentConnect_form #537
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: 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 }} |