build: composer update #112
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: Build & Deploy | |
on: | |
push: | |
tags: | |
- "v*" | |
branches: | |
- main | |
env: | |
NODE_VERSION: '13.x' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install composer dependencies | |
run: composer install --prefer-dist --no-progress --no-suggest | |
- name: PHPStan - Static code analysis | |
run: vendor/bin/phpstan analyse --memory-limit=256M | |
- name: PHP CodeSniffer | |
run: vendor/bin/phpcs | |
- name: Remove dev composer dependencies | |
run: composer install --no-dev | |
- name: Cleanup directory | |
run: | | |
rm -rf .bowerrc .git .github .phpstan _migration tests | |
rm .gitignore *.json *.lock docker-compose.yml Dockerfile phpstan.neon requirements.php webpack.config.js | |
- name: Deploy to server via scp | |
uses: appleboy/scp-action@master | |
with: | |
host: ${{ secrets.SSH_HOST }} | |
username: ${{ secrets.SSH_USERNAME }} | |
key: ${{ secrets.SSH_KEY }} | |
passphrase: ${{ secrets.SSH_PASSPHRASE }} | |
port: 22 | |
source: "." | |
target: "/home/${{ secrets.SSH_USERNAME }}/public_html/ch.electricbass" | |
- name: Execute remote ssh commands | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.SSH_HOST }} | |
username: ${{ secrets.SSH_USERNAME }} | |
key: ${{ secrets.SSH_KEY }} | |
passphrase: ${{ secrets.SSH_PASSPHRASE }} | |
port: 22 | |
script: php80 /home/${{ secrets.SSH_USERNAME }}/public_html/ch.electricbass/yii migrate/up --interactive=0 |