Skip to content

sudo preserve env

sudo preserve env #20

# deploy to prod
# for easy changes to python app or data processing this should work
# if database migrations need to be applied they will need to be done manually
name: deploy-to-prod
on:
push:
branches:
- main
paths-ignore:
- "processing/miscellaneous/"
- "*.md"
jobs:
deploy:
name: Deploy to prod env
runs-on: ubuntu-latest
steps:
- name: Configure SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519 && chmod 600 ~/.ssh/id_ed25519
echo "${{ vars.SSH_KNOWN_HOSTS }}" > ~/.ssh/known_hosts
echo "Host remote
User ${{ vars.SSH_USER }}
HostName ${{ vars.SSH_HOST }}
Port ${{ vars.SSH_PORT }}
IdentityFile ~/.ssh/id_ed25519
" > ~/.ssh/config
- name: Deploy on remote
run: ssh remote