Skip to content

Commit

Permalink
update github action for deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
igor-kamil committed Feb 8, 2024
1 parent 6aad136 commit f9ad017
Showing 1 changed file with 14 additions and 22 deletions.
36 changes: 14 additions & 22 deletions .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,25 +64,17 @@ jobs:
needs: [test]
if: github.ref == 'refs/heads/master'
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: 8.2
- name: Add Composer auth credentials (for Backpack Pro)
run: echo '${{ secrets.COMPOSER_AUTH_JSON }}' > $GITHUB_WORKSPACE/auth.json
- run: composer install --no-progress --no-interaction --no-dev
- uses: atymic/deployer-php-action@0.2.0
with:
ssh-private-key: ${{ secrets.DEPLOY_SSH_PRIVATE_KEY }}
ssh-known-hosts: ${{ secrets.DEPLOY_SSH_KNOWN_HOSTS }}
- run: php artisan deploy
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'

- name: Deploy
uses: deployphp/action@v1
with:
private-key: ${{ secrets.DEPLOY_SSH_PRIVATE_KEY }}
known-hosts: ${{ secrets.DEPLOY_SSH_KNOWN_HOSTS }}
deployer-version: '7.3.3'
dep: deploy

0 comments on commit f9ad017

Please sign in to comment.