name: Deploy "develop" branch

on:
  push:
    branches:
      - develop

jobs:
  deploy:
    name: Deploy
    runs-on: ubuntu-18.04
    steps:
    - uses: actions/checkout@v2
    - name: Get Composer Cache Directory
      id: composer-cache
      run: echo "::set-output name=dir::$(composer config cache-files-dir)"
    - name: Restore Composer cache
      uses: actions/cache@v2
      with:
        path: ${{ steps.composer-cache.outputs.dir }}
        key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
        restore-keys: |
          ${{ runner.os }}-composer-
    - uses: shivammathur/setup-php@v2
      with:
        php-version: 7.4
    - run: composer install --no-progress --no-interaction --no-dev
    - uses: atymic/deployer-php-action@0.1.1
      with:
          ssh-private-key: ${{ secrets.DEPLOY_SSH_PRIVATE_KEY }}
          ssh-known-hosts: ${{ secrets.DEPLOY_SSH_KNOWN_HOSTS }}
    - run: php artisan deploy test

name: Deploy "develop" branch

on:
  push:
    branches:
      - develop

jobs:
  deploy:
    name: Deploy
    runs-on: ubuntu-18.04
    steps:
    - uses: actions/checkout@v2
    - name: Get Composer Cache Directory
      id: composer-cache
      run: echo "::set-output name=dir::$(composer config cache-files-dir)"
    - name: Restore Composer cache
      uses: actions/cache@v2
      with:
        path: ${{ steps.composer-cache.outputs.dir }}
        key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
        restore-keys: |
          ${{ runner.os }}-composer-
    - uses: shivammathur/setup-php@v2
      with:
        php-version: 7.4
        tools: composer:v1
    - run: composer install --no-progress --no-interaction --no-dev
    - uses: atymic/deployer-php-action@0.1.1
      with:
          ssh-private-key: ${{ secrets.DEPLOY_SSH_PRIVATE_KEY }}
          ssh-known-hosts: ${{ secrets.DEPLOY_SSH_KNOWN_HOSTS }}
    - run: php artisan deploy test

Use composer v1 our composer.lock is currently incompatible with Composer 2
Use composer v1
our composer.lock is currently incompatible with Composer 2
