Skip to content

Commit 3e96bf4

Browse files
committed
Merge branch 'main' into demo
2 parents 94151fd + 15d3cc6 commit 3e96bf4

File tree

2 files changed

+116
-0
lines changed

2 files changed

+116
-0
lines changed

.github/workflows/deploy-demo.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Deploy
2+
3+
on:
4+
push:
5+
branches: [demo]
6+
jobs:
7+
deploy:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: shivammathur/setup-php@v2
11+
with:
12+
php-version: '8.1'
13+
- uses: actions/checkout@v2
14+
- uses: actions/setup-node@v3
15+
with:
16+
node-version: 16
17+
- uses: mirromutth/mysql-action@v1.1
18+
with:
19+
mysql database: laravel-test-db
20+
mysql user: laravel_test_user
21+
mysql password: example
22+
- name: Copy .env
23+
run: cp .env.example .env
24+
- name: Install composer Dependencies
25+
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
26+
- name: Install node dependencies
27+
run: npm ci
28+
- name: Setup Project
29+
run: |
30+
php artisan config:clear
31+
php artisan cache:clear
32+
php artisan key:generate
33+
npm run build
34+
- name: Directory Permissions
35+
run: chmod 755 -R storage bootstrap/cache
36+
# - name: Run Unit tests
37+
# env:
38+
# APP_ENV: testing
39+
# DB_CONNECTION: mysql
40+
# DB_USERNAME: laravel_test_user
41+
# DB_PASSWORD: super_secret
42+
# DB_DATABASE: laravel_test_db
43+
# run: php artisan test
44+
- name: Deploy to Server
45+
if: ${{ success() }}
46+
uses: appleboy/ssh-action@master
47+
with:
48+
host: ${{ secrets.SSH_HOST }}
49+
port: ${{ secrets.SSH_PORT }}
50+
username: ${{ secrets.SSH_USERNAME }}
51+
key: ${{ secrets.SSH_KEY }}
52+
script_stop: true
53+
script: |
54+
cd domains
55+
cd lcommerce.net
56+
git pull
57+
composer install
58+
php artisan migrate --force

.github/workflows/deploy-main.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Deploy
2+
3+
on:
4+
push:
5+
branches: [main]
6+
jobs:
7+
deploy:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: shivammathur/setup-php@v2
11+
with:
12+
php-version: '8.1'
13+
- uses: actions/checkout@v2
14+
- uses: actions/setup-node@v3
15+
with:
16+
node-version: 16
17+
- uses: mirromutth/mysql-action@v1.1
18+
with:
19+
mysql database: laravel-test-db
20+
mysql user: laravel_test_user
21+
mysql password: example
22+
- name: Copy .env
23+
run: cp .env.example .env
24+
- name: Install composer Dependencies
25+
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
26+
- name: Install node dependencies
27+
run: npm ci
28+
- name: Setup Project
29+
run: |
30+
php artisan config:clear
31+
php artisan cache:clear
32+
php artisan key:generate
33+
npm run build
34+
- name: Directory Permissions
35+
run: chmod 755 -R storage bootstrap/cache
36+
# - name: Run Unit tests
37+
# env:
38+
# APP_ENV: testing
39+
# DB_CONNECTION: mysql
40+
# DB_USERNAME: laravel_test_user
41+
# DB_PASSWORD: super_secret
42+
# DB_DATABASE: laravel_test_db
43+
# run: php artisan test
44+
- name: Deploy to Server
45+
if: ${{ success() }}
46+
uses: appleboy/ssh-action@master
47+
with:
48+
host: ${{ secrets.SSH_HOST }}
49+
port: ${{ secrets.SSH_PORT }}
50+
username: ${{ secrets.SSH_USERNAME }}
51+
key: ${{ secrets.SSH_KEY }}
52+
script_stop: true
53+
script: |
54+
cd domains
55+
cd lcommerce.net
56+
git pull
57+
composer install
58+
php artisan migrate --force

0 commit comments

Comments
 (0)