-
-
Notifications
You must be signed in to change notification settings - Fork 1
81 lines (66 loc) · 1.73 KB
/
pipe.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Version
on:
push:
branches: [ dev ]
jobs:
version:
name: ⚛️ Update Canonical Version
runs-on: ubuntu-latest
steps:
- name: Setup Node.js environment
uses: actions/[email protected]
with:
node-version: '16.5'
- name: Checkout
uses: actions/[email protected]
- name: Update Package V
run: |
git config --global user.email "[email protected]"
git config --global user.name "Pollux Autoupdate"
git pull
npm version patch -m "Autoupgrade to %s"
git push
pull:
env:
DIR: ${{ secrets.DASH_DIR_DEV }}
name: 🔁 Sync with Repository
needs: version
runs-on: self-hosted
steps:
- uses: actions/checkout@v2
- name: Go to directory
run: cd $DIR
- name: Git Reset
run: |
git reset --hard
git pull
npm:
runs-on: self-hosted
needs: pull
env:
DIR: ${{ secrets.DASH_DIR_DEV }}
name: 📦 Build (NPM)
steps:
- name: Running NPM install
run: |
cd $DIR
npm install
- name: Audit fix
run: npm audit fix
continue-on-error: true
- name: Update Package
run: |
git add ./package-lock.json
git commit -m "Auto update package-lock"
git push
continue-on-error: true
deploy:
name: 🚀 Launch
needs: npm
runs-on: self-hosted
env:
DIR: ${{ secrets.DASH_DIR_DEV }}
steps:
- name: Go go Power Rangers
run: |
pm2 restart PLR