Update workflow #18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: 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/' | |
exclude: '**/.git*,**/.git*/*,**/simplehtmldom/manual/*,**/simplehtmldom/example/*,**/simplepie/src/*' | |
- 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/' |