From 51bf2b88c927cd2c102c0ea79bad5c058e13b245 Mon Sep 17 00:00:00 2001 From: Will Rossiter Date: Fri, 8 Sep 2023 14:15:45 +1200 Subject: [PATCH] feat: migrate to github actions --- .github/workflows/ci.yml | 12 ++++++++++++ .travis.yml | 9 --------- README.md | 9 ++++----- bin/compile | 2 +- bin/installer | 10 +++++----- composer.json | 18 ++---------------- 6 files changed, 24 insertions(+), 36 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..43a0107 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,12 @@ +name: CI + +on: [push] + +jobs: + build-test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - uses: php-actions/composer@v6 # or alternative dependency management + - uses: php-actions/phpunit@v3 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ce36111..0000000 --- a/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -language: php - -php: - - 7.4 - - 8.0 - -before_script: - - composer self-update - - composer install --dev --prefer-dist diff --git a/README.md b/README.md index d367c3b..654ac8f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ # Beam -[![Build Status](https://travis-ci.org/heyday/beam.png?branch=master)](https://travis-ci.org/heyday/beam) - Beam is a command line utility for deploying websites to servers. It allows you to sync files between a version control system and a remote host, and run shell commands at fixed stages to further automate the deployment process. Beam works best (and by default) using `rsync` over `ssh`, though it also has support for intelligent deployment through SFTP @@ -10,11 +8,12 @@ and FTP. ## Installation ```bash -$ curl -s https://getbeam.io/installer -O; php installer +$ git clone git@github.com:heyday/beam.git +$ cd beam +$ composer install +$ php ./bin/installer ``` -Note: this will create a file called `installer` and then delete it after the installation has completed. - ## Updating $ beam self-update diff --git a/bin/compile b/bin/compile index 5b73eaa..9a140f8 100755 --- a/bin/compile +++ b/bin/compile @@ -21,4 +21,4 @@ try { $e->getLine() ); exit(1); -} \ No newline at end of file +} diff --git a/bin/installer b/bin/installer index 24a8965..9ee85f1 100644 --- a/bin/installer +++ b/bin/installer @@ -13,10 +13,10 @@ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is furnished * to do so, subject to the following conditions: - * + * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -182,7 +182,7 @@ function checkPlatform() } out("All settings correct for using Beam", 'success'); - + return true; } @@ -311,7 +311,7 @@ function out($text, $color = null, $newLine = true) if ($newLine) { $format .= PHP_EOL; } - + printf($format, $text); } @@ -337,4 +337,4 @@ function prompt($prompt, array $options, $default = null) } while (!in_array($response, $options)); return $response; -} \ No newline at end of file +} diff --git a/composer.json b/composer.json index 7bdd08d..d48ad4b 100644 --- a/composer.json +++ b/composer.json @@ -2,30 +2,16 @@ "name": "heyday/beam", "description": "A utility for deploying files to servers", "minimum-stability": "stable", - "authors": [ - { - "name": "Shane Garelja", - "email": "shane@heyday.co.nz" - }, - { - "name": "Cam Spiers", - "email": "cameron@heyday.co.nz" - }, - { - "name": "Stephen Holdaway", - "email": "stephen.holdaway@heyday.co.nz" - } - ], "config": { "platform": { - "php": "7.4" + "php": "8.2" } }, "provide": { "ext-ssh2": "*" }, "require": { - "php": ">=7.4", + "php": ">=8", "symfony/console": "^5.4.9", "symfony/process": "^5.4.8", "symfony/options-resolver": "^5.4.3",