-
Notifications
You must be signed in to change notification settings - Fork 9
64 lines (47 loc) · 1.5 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Build & Deploy
on: [push]
env:
NODE_VERSION: '13.x'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup PHP with Composer
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
tools: composer:v1
- name: Install PHP dependencies
run: composer install --no-dev --prefer-dist --no-progress --no-suggest
- name: Setup configuration
run: cp .env.example .env
- name: Generate application key
run: php artisan key:generate
- name: Create an SQLite database
run: touch database/database.sqlite
- name: Run database migrations
run: php artisan migrate --force
- name: Run database seeder
run: php artisan db:seed --force
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install NPM dependencies
run: npm ci
- name: Build assets
run: npm run prod
- name: Cleanup directory
run: |
rm -rf .git .github node_modules tests
rm .gitignore
- name: Deploy to server via scp
uses: appleboy/scp-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
password: ${{ secrets.SSH_PASSWORD }}
port: 22
source: "."
target: "/home/tbreusst/public_html/ch.tebe.pingcrm-mithril"