Skip to content

Commit

Permalink
setup actions
Browse files Browse the repository at this point in the history
  • Loading branch information
indrazm committed Nov 14, 2024
1 parent 018e227 commit 6da9330
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: CI/CD pipeline learning

on:
push:
branches:
- withDocker

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout the code
uses: actions/checkout@v2

- name: Setup SSH
uses: webfactory/ssh-agent@v0.5.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}

- name: Deploy to server
run: |
ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} << EOF
cd layered-elysia
git pull
sudo docker compose build --no-cache
sudo docker compose down
sudo docker compose up -d
EOF

0 comments on commit 6da9330

Please sign in to comment.