Skip to content

Rollback production

Rollback production #2

Workflow file for this run

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'