File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed
Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Continuous Deployment
2+
3+ # on:
4+ # workflow_dispatch:
5+ # workflow_run:
6+ # workflows:
7+ # - "Continuous Integration"
8+ # types:
9+ # - completed
10+
11+ permissions :
12+ contents : read
13+
14+ jobs :
15+ build-and-deploy :
16+ name : Build & Deploy
17+
18+ runs-on : ubuntu-latest
19+
20+ env :
21+ ENV : PRODUCTION
22+
23+ steps :
24+ - name : Deploying via SSH
25+ uses : appleboy/ssh-action@v1.2.2
26+ with :
27+ host : ${{ secrets.HOST }}
28+ username : ${{ secrets.USERNAME }}
29+ password : ${{ secrets.PASSWORD }}
30+ port : ${{ secrets.PORT }}
31+ script : |
32+ sudo apt update && sudo apt upgrade -y
33+ docker buildx prune --force
34+ mkdir --parents /var/www/html/dockerized-php
35+ cd /var/www/html
36+ git -C dockerized-php pull || git clone git@github.com:AlcidesRC/dockerized-php.git .
37+ cd dockerized-php
38+ git fetch -ap && git reset --hard && git clean -fd && git pull
39+ unlink .env.makefile && echo "APP_ENV=prod" > .env.makefile
40+ make deploy
You can’t perform that action at this time.
0 commit comments