-
Notifications
You must be signed in to change notification settings - Fork 5
34 lines (34 loc) · 1.06 KB
/
staging.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
on:
push:
branches:
- develop
jobs:
FTP-Deploy-Action:
name: SFTP deploy & post install commands
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: FTP-Deploy-Action
uses: SamKirkland/FTP-Deploy-Action@2.0.0
env:
FTP_SERVER: ${{ secrets.HOST }}
FTP_USERNAME: ${{ secrets.USERNAME }}
FTP_PASSWORD: ${{ secrets.PASSWORD }}
METHOD: sftp
LOCAL_DIR: .
REMOTE_DIR: ${{ secrets.SUB_DIR_STAGING }}
ARGS: --verbose --delete --exclude=.git --parallel=10 --exclude=.env --exclude=vendor --exclude=node_modules
- 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_STAGING }}
composer install
php craft up
yarn install
yarn prod