Skip to content

Commit

Permalink
Create ContinuousIntegration.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafa13io authored Jun 9, 2024
1 parent 2012d26 commit a5e3254
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/ContinuousIntegration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Continuous Integration

on:
push:
branches:
- master

concurrency:
group: master
cancel-in-progress: true

jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Configure SSH
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
SSH_HOST: ${{ secrets.SSH_HOST }}
SSH_USER: ${{ secrets.SSH_USER }}
run: |
mkdir -p ~/.ssh/
echo "$SSH_PRIVATE_KEY" > ~/.ssh/github
chmod 600 ~/.ssh/github
cat >>~/.ssh/config <<END
Host target
HostName $SSH_HOST
User $SSH_USER
IdentityFile ~/.ssh/github
LogLevel ERROR
StrictHostKeyChecking no
END
- name: Run deploy
run: |
ssh target "cd concertify/ && sudo docker-compose down && git pull && sudo docker-compose build && sudo docker-compose up -d --force-recreate"

0 comments on commit a5e3254

Please sign in to comment.