-
Notifications
You must be signed in to change notification settings - Fork 5
36 lines (36 loc) · 1.2 KB
/
demo.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
on:
push:
branches:
- demo
jobs:
FTP-Deploy-Action:
name: SFTP deploy & post install commands
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
ref: 'demo'
- name: FTP-Deploy-Action
uses: SamKirkland/[email protected]
env:
FTP_SERVER: ${{ secrets.HOST }}
FTP_USERNAME: ${{ secrets.USERNAME }}
FTP_PASSWORD: ${{ secrets.PASSWORD }}
METHOD: sftp
LOCAL_DIR: .
REMOTE_DIR: ${{ secrets.SUB_DIR_DEMO }}
ARGS: --verbose --delete --exclude=.git --parallel=10 --exclude=.env --exclude=vendor --exclude=node_modules --exclude=public --exclude=storage
- name: Post deploy script
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
port: ${{ secrets.PORT }}
timeout: 60000s
script: |
cd ${{ secrets.SUB_DIR_DEMO }}
composer install
./craft migrate/all
./craft project-config/apply
chmod +x post-deploy-craft3.sh && ./post-deploy-craft3.sh --env=production