-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (47 loc) · 1.4 KB
/
deploy.yml
File metadata and controls
55 lines (47 loc) · 1.4 KB
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
name: deploy
on: push
jobs:
deploy:
runs-on: ubuntu-latest
env:
APP_URL: https://lastbackup.devert.net/
API_URL: https://lastbackup.devert.net/
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12.x
- uses: actions/cache@v2
id: npm-v1
with:
path: |
~/.npm
node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: npm install
if: steps.npm-v1.outputs.cache-hit != 'true'
run: |
npm ci
- name: composer cache
uses: actions/cache@v2
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
- name: composer install
uses: php-actions/composer@v5
with:
dev: no
args: --profile --ignore-platform-reqs
- name: build
run: npm run build && npm run build-api
- name: deploy
uses: easingthemes/ssh-deploy@v2.1.5
env:
SSH_PRIVATE_KEY: ${{ secrets.SERVER_SSH_KEY }}
ARGS: "-rltgoDzvO --delete"
SOURCE: ".dist/"
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
REMOTE_USER: ${{ secrets.REMOTE_USER }}
TARGET: ${{ secrets.REMOTE_TARGET }}