Skip to content

Commit cca59e2

Browse files
committed
Theoretically fully migrated over to deployer
1 parent f77fd33 commit cca59e2

File tree

3 files changed

+23
-34
lines changed

3 files changed

+23
-34
lines changed

.github/workflows/main.yaml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,31 @@ on:
44
push:
55
branches: [ main ]
66

7+
concurrency: production_environment
8+
79
jobs:
810
deploy:
911
environment: production
1012
runs-on: ubuntu-latest
1113
steps:
1214
- uses: actions/checkout@v2
15+
1316
- name: Composer Install
1417
run: composer install --ignore-platform-reqs
18+
19+
- name: Setup PHP
20+
uses: shivammathur/setup-php@v2
21+
with:
22+
php-version: "8.1"
23+
24+
- name: Install dependencies
25+
run: composer install
26+
1527
- name: Run Tests
1628
run: vendor/bin/phpunit
17-
- name: Deploy to production
18-
uses: appleboy/ssh-action@master
29+
30+
- name: Deploy
31+
uses: deployphp/action@v1
1932
with:
20-
username: ${{ secrets.SSH_USERNAME }}
21-
host: ${{ secrets.SSH_HOST }}
22-
key: ${{ secrets.SSH_KEY }}
23-
script: 'cd /var/www/html2 && ./deploy/server_deploy.sh'
33+
private-key: ${{ secrets.SSH_KEY }}
34+
dep: deploy

deploy.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@
1717
->set('remote_user', 'deployer')
1818
->set('deploy_path', '/var/www/html');
1919

20+
// Custom tasks
21+
task('artisan:horizon:terminate', artisan('horizon:terminate'));
22+
task('artisan:websockets:restart', artisan('websockets:restart'));
23+
2024
// Hooks
2125

2226
after('deploy:failed', 'deploy:unlock');
27+
after('deploy:symlink', 'artisan:horizon:terminate');
28+
after('deploy:symlink', 'artisan:websockets:restart');

deploy/server_deploy.sh

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)