Skip to content

Commit

Permalink
Merge pull request #1 from swiss-artg/build
Browse files Browse the repository at this point in the history
Add build automation
  • Loading branch information
corvus-ch authored Nov 25, 2024
2 parents c2e1d71 + 597dd8c commit 7e442fc
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .ftpignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
*.log
.ddev
.editorconfig
.ftp*
.git*
.git*/**
docker*
composer.*
web/sites/*/files/
web/sites/*/settings.*.php
50 changes: 50 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
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: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Composer install
uses: php-actions/composer@v6
with:
dev: no
args: --ignore-platform-reqs --classmap-authoritative

- name: Dry run file upload
if: github.ref != 'refs/heads/trunk'
run: |
rclone -q --exclude-from .ftpignore --copy-links check --combined - . remote: 2>/dev/null | grep -vE '^= '
- name: Upload files
if: github.ref == 'refs/heads/trunk'
run: |
rclone -q --exclude-from .ftpignore --copy-links sync . remote:

0 comments on commit 7e442fc

Please sign in to comment.