Added "Wir sind Contao" #286
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: CI | |
on: | |
pull_request: ~ | |
push: | |
branches: | |
- main | |
tags: | |
- '*' | |
jobs: | |
cs: | |
name: Coding style | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.3 | |
coverage: none | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install the dependencies | |
run: composer install --no-interaction --no-progress | |
- name: Check the coding style | |
run: vendor/bin/ecs check bin public src tests --config ecs.php --no-progress-bar | |
- name: Analyze the redirects.yaml | |
run: bin/yaml-lint redirects.yaml | |
tests: | |
name: Unit tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.3 | |
coverage: none | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install the dependencies | |
run: composer install --no-interaction --no-progress | |
- name: Run the unit tests | |
run: vendor/bin/phpunit | |
build_and_deploy: | |
name: Build and deploy | |
if: github.ref == 'refs/heads/main' | |
runs-on: ubuntu-latest | |
needs: [cs, tests] | |
steps: | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.3 | |
coverage: none | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install the dependencies | |
run: composer install -o --no-dev --no-interaction --no-progress | |
- name: Dump routes | |
run: bin/dump-routes | |
- name: Deploy | |
uses: appleboy/scp-action@master | |
with: | |
host: ${{ secrets.DEPLOY_HOST }} | |
username: ${{ secrets.DEPLOY_USERNAME }} | |
port: ${{ secrets.DEPLOY_PORT }} | |
key: ${{ secrets.DEPLOY_KEY }} | |
source: 'public/*,src/*,var/*,vendor/*' | |
target: ${{ secrets.DEPLOY_TARGET_PATH }} | |
rm: true |