Skip to content

Update workflows

Update workflows #17

name: Deploy to FTP/FTPS
on:
push:
workflow_dispatch:
jobs:
Deploy-SFTP:
runs-on: ubuntu-latest
steps:
- name: Initializing feedpiper repository
# https://github.com/actions/checkout
uses: actions/checkout@v4
- 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: Importing Composer dependancies
run: composer install
- name: Cleaning up files and folders we do not want to upload
run: |
rm -rf './_config.yml'
rm -rf './.git'
rm -rf './.gitattributes'
rm -rf './.github'
rm -rf './.gitignore'
rm -rf './composer.json'
rm -rf './composer.lock'
rm -rf './config/.git'
rm -rf './config/.gitattributes'
rm -rf './config/.github'
rm -rf './config/.gitignore'
rm -rf './vendor/simplehtmldom/simplehtmldom/example/'
rm -rf './vendor/simplehtmldom/simplehtmldom/manual/'
- name: Deploying to FTP/FTPS Server
# https://github.com/SamKirkland/FTP-Deploy-Action
uses: SamKirkland/FTP-Deploy-Action@v4.3.5
with:
protocol: ftps
server: ${{ secrets.SYNOLOGY_SERVER_HOSTNAME }}
port: ${{ secrets.SYNOLOGY_SERVER_PORT_FTPS }}
username: ${{ secrets.SYNOLOGY_SERVER_USERNAME }}
password: ${{ secrets.SYNOLOGY_SERVER_PASSWORD }}
local-dir: './'
server-dir: '/web/feedpiper/'
- name: Creating cache folder
# https://github.com/marketplace/actions/ssh-remote-commands
uses: appleboy/ssh-action@v0.1.10
with:
host: ${{ secrets.SYNOLOGY_SERVER_HOSTNAME }}
username: ${{ secrets.SYNOLOGY_SERVER_USERNAME }}
password: ${{ secrets.SYNOLOGY_SERVER_PASSWORD }}
port: ${{ secrets.SYNOLOGY_SERVER_PORT_SFTP }}
script: |
cd '/volume1/web/feedpiper/'
mkdir -p './cache/'
chmod 777 './cache/'