Skip to content

Speed up deployment #15

Speed up deployment

Speed up deployment #15

Workflow file for this run

name: CI
on:
pull_request:
branches:
- trunk
push:
branches:
- trunk
jobs:
ci:
runs-on: ubuntu-latest
steps:
- name: Setup Rclone
uses: AnimMouse/setup-rclone@v1
with:
rclone_config: |
[remote]
type = sftp
host = ${{ secrets.FTP_SERVER }}
user = ${{ secrets.FTP_USER }}
port = ${{ secrets.FTP_PORT }}
# Password must be obfuscated using `rclone obfuscate`
pass = ${{ secrets.FTP_PASSWORD }}
shell_type = unix
md5sum_command = none
sha1sum_command = none
disable_base64: true
- name: Setup cache
uses: actions/[email protected]
id: remote
with:
path: ${{ runner.temp }}/remote
key: remote
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Composer install
uses: php-actions/composer@v6
with:
args: --no-dev --ignore-platform-reqs
- name: Download from remote
run: |
rclone --exclude-from .ftpignore --copy-links sync remote: ${{ runner.temp }}/remote
- name: Update remote
run: |
rsync --checksum --copy-links --delete --perms --recursive ./ ${{ runner.temp }}/remote
- name: Dry run upload to remote
if: github.ref != 'refs/heads/trunk'
run: |
rclone -q --exclude-from .ftpignore --copy-links check --combined - ${{ runner.temp }}/remote: remote: 2>/dev/null | grep -vE '^= '
- name: Upload to remote
if: github.ref == 'refs/heads/trunk'
run: |
rclone --exclude-from .ftpignore --copy-links sync ${{ runner.temp }}/remote: remote: