Convert docs shortlinks to /docs subpath and added a new one for /docs/crawler #227
Workflow file for this run
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: 7.4 | |
coverage: none | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install the dependencies | |
run: composer install --no-interaction --no-suggest | |
- name: Check the coding style | |
run: vendor/bin/ecs check bin public src tests --config ecs.php --no-progress-bar --ansi | |
- name: Analyze the redirects.yaml | |
run: bin/yaml-lint redirects.yaml | |
tests: | |
name: Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 7.4 | |
coverage: none | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install the dependencies | |
run: composer install --no-interaction --no-suggest | |
- name: Run the unit tests | |
run: vendor/bin/phpunit --colors=always | |
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: 7.4 | |
coverage: none | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install the dependencies | |
run: composer install -o --no-dev --no-interaction --no-suggest | |
- 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 |