Rollback production #2
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: Rollback production | |
on: | |
workflow_dispatch: | |
jobs: | |
rollback: | |
environment: production | |
concurrency: production | |
runs-on: ubuntu-latest | |
steps: | |
- name: Add SSH key | |
env: | |
SSH_AUTH_SOCK: /tmp/ssh_agent.sock | |
run: | | |
mkdir -p /home/runner/.ssh | |
ssh-keyscan sewera.dev >> /home/runner/.ssh/known_hosts | |
echo "${{ secrets.BLOG_PROD_KEY }}" > /home/runner/.ssh/github_actions | |
chmod 600 /home/runner/.ssh/github_actions | |
ssh-agent -a $SSH_AUTH_SOCK > /dev/null | |
ssh-add /home/runner/.ssh/github_actions | |
- name: Rollback production | |
env: | |
SSH_AUTH_SOCK: /tmp/ssh_agent.sock | |
run: | | |
ssh -i /home/runner/.ssh/github_actions \ | |
${{ secrets.BLOG_PROD_USER }}@sewera.dev \ | |
'./ROLLBACK_BLOG' |