generated from practice-uffs/template-webapp-laravel
-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (30 loc) · 888 Bytes
/
deploy.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
name: deploy
on:
push:
branches:
- master
env:
PROD_HOST: mural.practice.uffs.cc
PROD_WEB_DIRECTORY: /home/ccuffspractice/mural.practice.uffs.cc
COMPOSER_BIN: php-7.3 ~/.php/composer/composer
PHP_BIN: php-7.3
jobs:
deploy:
name: Deploy to production
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Prepare deploy server
uses: appleboy/ssh-action@master
with:
host: ${{ env.PROD_HOST }}
username: ${{ secrets.PROD_USERNAME }}
password: ${{ secrets.PROD_PASSWORD }}
script: |
cd ${{ env.PROD_WEB_DIRECTORY }}
git reset --hard
git pull
${{ env.COMPOSER_BIN }} install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist
${{ env.PHP_BIN }} artisan migrate
npm install
npm run production