forked from markusbink/basisdokument-implementierung
-
Notifications
You must be signed in to change notification settings - Fork 2
53 lines (43 loc) · 1.13 KB
/
workflow_dev.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
name: Deploy Dev
on:
push:
branches:
- "dev"
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [15.x]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install and build
run: npm install --force && npm run build
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: build-dir
path: build
retention-days: 5
DeployDev:
name: Deploy Test Environment Server
needs: [build]
runs-on: ubuntu-latest
steps:
- name: SSH
run: |
install -m 600 -D /dev/null ~/.ssh/id_rsa
echo "${{ secrets.DEPLOY_KEY }}" > ~/.ssh/id_rsa
echo "HIER"
ssh-keyscan "${{ secrets.SSH_HOST }}" > ~/.ssh/known_hosts
- name: Get Build Artifact
uses: actions/download-artifact@v3
with:
name: build-dir
- name: Deploy Live
run: |
ls
scp -r * ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:${{ secrets.WORK_DIR_DEV }}
- name: Cleanup
run: rm -rf ~/.ssh