Skip to content

Commit

Permalink
Merge pull request #2 from SELab-2/master_action
Browse files Browse the repository at this point in the history
Add deploy github action
  • Loading branch information
xerbalind authored Feb 20, 2024
2 parents d10f4e5 + d1bacd1 commit 9059994
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Deployment

concurrency:
group: production

on:
push:
branches:
- main
jobs:
deployment:
runs-on: self-hosted
environment:
name: production
url: https://sel2-5.ugent.be
steps:
- name: Add private key
shell: bash
run: |
install -m 600 -D /dev/null ~/.ssh/id_rsa
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
ssh-keyscan -H localhost > ~/.ssh/known_hosts
- name: deploy
run: ssh selab2@localhost "./deploy.sh"
- name: cleanup
run: rm -rf ~/.ssh



0 comments on commit 9059994

Please sign in to comment.