-
Notifications
You must be signed in to change notification settings - Fork 1
65 lines (58 loc) · 2.39 KB
/
deploy_to_sftp composer.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Deploy to SFTP Composer
on: push
jobs:
Deploy-SFTP:
runs-on: ubuntu-latest
steps:
- name: Initializing feedpiper repository
# https://github.com/actions/checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Importing Composer dependancies
run: composer install
- name: Initializing feedpiper-config repository - Delete default config folder
run: rm -rf './config/'
- name: Initializing feedpiper-config repository
# This repository is meant to deploy my personal configuration stored in a separate repository
# https://github.com/actions/checkout
uses: actions/checkout@v4
continue-on-error: true
with:
repository: kenijo/feedpiper-config
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
path: config
- name: Cleaning up - Delete folders we do not want to upload
run: |
find . -type d -name '*/.git*/' -prune -exec rm -rf {} \;
find . -type d -name '*/.vscode*/' -prune -exec rm -rf {} \;
rm -rf '*/simplehtmldom/manual/'
rm -rf '*/simplehtmldom/example/'
rm -rf '*/simplepie/src/'
- name: Cleaning up - Delete files we do not want to upload
run: |
find . -type f -name '.git' -delete
find . -type f -name '.gitattributes' -delete
find . -type f -name '.gitignore' -delete
- name: Deploying to SFTP Server
# https://github.com/marketplace/actions/sftp-uploader
uses: wangyucode/sftp-upload-action@v2.0.4
with:
host: ${{ secrets.SYNOLOGY_SERVER_HOSTNAME }}
port: ${{ secrets.SYNOLOGY_SERVER_PORT_SFTP }}
username: ${{ secrets.SYNOLOGY_SERVER_USERNAME }}
password: ${{ secrets.SYNOLOGY_SERVER_PASSWORD }}
localDir: './'
remoteDir: '/web/feedpiper/'
- name: Creating cache folder
# https://github.com/marketplace/actions/ssh-remote-commands
uses: appleboy/ssh-action@v1.2.0
with:
host: ${{ secrets.SYNOLOGY_SERVER_HOSTNAME }}
port: ${{ secrets.SYNOLOGY_SERVER_PORT_SFTP }}
username: ${{ secrets.SYNOLOGY_SERVER_USERNAME }}
password: ${{ secrets.SYNOLOGY_SERVER_PASSWORD }}
script: |
cd '/volume1/web/feedpiper/'
mkdir -p './cache/'
chmod 777 './cache/'