Skip to content

Commit

Permalink
Auto deploy on push
Browse files Browse the repository at this point in the history
  • Loading branch information
typeofweb committed Sep 3, 2022
1 parent 973365b commit 23e1e5c
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,14 @@ on:
push:
branches: [main]

env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Setup SSH Keys and known_hosts
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: |
mkdir -p ~/.ssh
ssh-keyscan -H github.com >> ~/.ssh/known_hosts
ssh-keyscan -H s18.mydevil.net >> ~/.ssh/known_hosts
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
ssh-add - <<< "${{ secrets.SSH_PRIVATE_KEY }}"
ssh [email protected] 'source ~/.bashrc && ssh-add ~/.ssh/github && bash -s' < ./ssh-script-deploy.sh
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only

0 comments on commit 23e1e5c

Please sign in to comment.