-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7c0f3e5
commit 56ef0bb
Showing
2 changed files
with
29 additions
and
30 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
on: | ||
push: | ||
branches: | ||
- master | ||
workflow_dispatch: | ||
|
||
jobs: | ||
run_pull: | ||
name: run pull | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- 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_KEY }}" > ~/.ssh/id_rsa | ||
ssh-keyscan -H ${{ secrets.SSH_HOST }} > ~/.ssh/known_hosts | ||
- name: zip repo and deploy | ||
run: | | ||
zip -r server.zip . | ||
scp server.zip ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:/home/${{secrets.SSH_USER}}/ | ||
ssh ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}} "./deploy.sh" | ||
- name: cleanup | ||
run: rm -rf ~/.ssh |
This file was deleted.
Oops, something went wrong.