Skip to content

Commit

Permalink
Init CD github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
neoformit authored Jul 16, 2023
1 parent fee4d33 commit 89d769b
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/manual.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Deploy to production on push
on:
push:
branches:
- main
workflow_dispatch:

jobs:
run_pull:
name: run pull
runs-on: ubuntu-latest

steps:
- name: install ssh keys
# check this thread to understand why its needed:
# https://stackoverflow.com/a/70447517
run: |
install -m 600 -D /dev/null ~/.ssh/id_rsa
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
ssh-keyscan -H ${{ secrets.SSH_HOST }} > ~/.ssh/known_hosts
- name: connect and pull
run: ssh ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} "./update.sh && exit"
- name: cleanup
run: rm -rf ~/.ssh

0 comments on commit 89d769b

Please sign in to comment.