-
Notifications
You must be signed in to change notification settings - Fork 2
35 lines (32 loc) · 939 Bytes
/
deploy-prod.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: Deploy on Production
on: [push]
jobs:
Deploy_to_production_server:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Deploy to production server
uses: appleboy/[email protected]
with:
host: ${{ secrets.PROD_HOST }}
username: ${{ secrets.PROD_USERNAME }}
key: ${{ secrets.PROD_KEY }}
port: ${{ secrets.PROD_PORT }}
command_timeout: 30m
script: |
cd ${{secrets.PROD_PROJECT_DIR}}
export GIT_TRACE_PACKET=1
export GIT_TRACE=1
export GIT_CURL_VERBOSE=1
git stash -u
git pull origin main
npm i
npm run build
composer update
php artisan event:cache
php artisan route:cache
php artisan view:cache
php artisan optimize:clear
php artisan migrate
rm -rf public/storage
php artisan storage:link