Skip to content

Commit 1314daa

Browse files
committed
ops: github pipeline
1 parent b0e12c4 commit 1314daa

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/pipeline.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
# Définir les jobs
9+
jobs:
10+
deploy:
11+
name: Deploy to server
12+
runs-on: ubuntu-latest
13+
environment: production
14+
steps:
15+
- name: Deploy over SSH
16+
uses: appleboy/ssh-action@v1.0.0
17+
with:
18+
host: ${{ secrets.SSH_HOST }}
19+
username: ${{ secrets.SSH_USER }}
20+
key: ${{ secrets.SSH_KEY }}
21+
script: |
22+
cd /home/debian/websites/thecode-website
23+
git pull
24+
docker-compose down
25+
docker-compose build --no-cache
26+
docker-compose up -d
27+
docker image prune -f

0 commit comments

Comments
 (0)