-
Notifications
You must be signed in to change notification settings - Fork 1
executable file
·59 lines (56 loc) · 1.95 KB
/
node.js.deploy.yml
File metadata and controls
executable file
·59 lines (56 loc) · 1.95 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
56
57
58
59
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Deploy
on: [workflow_dispatch]
jobs:
publish:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install node_modules
run: npm i
- name: Lint js/ts
run: npm run lint --if-present
- name: Build Rollup
run: npm run build --if-present
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
API_TOKEN: ${{secrets.PYLON_API_KEY}}
WEBHOOK_URL: ${{secrets.WEBHOOK_URL}}
MASTER_WEBHOOK: ${{secrets.MASTER_WEBHOOK}}
USERS_WEBHOOK: ${{secrets.USERS_WEBHOOK}}
PROXY_API_URL: ${{secrets.PROXY_API_URL}}
PROXY_API_KEY: ${{secrets.PROXY_API_KEY}}
PROXY_API_BOT_TOKEN: ${{secrets.PROXY_API_BOT_TOKEN}}
CONTROL_USERS_ROLE: ${{secrets.CONTROL_USERS_ROLE}}
GITHUB: true
# - name: Upload bundle
# uses: actions/upload-artifact@v2
# with:
# name: bundle.js
# path: dist/bundle.js
- name: Build Public
run: npm run public --if-present
- name: Pushes Public
uses: dmnemec/copy_file_to_another_repo_action@main
env:
API_TOKEN_GITHUB: ${{ secrets.GH_TOKEN }}
with:
source_file: 'dist_public/bundle.js'
destination_repo: 'weebsquad/pyboat-deploy'
destination_folder: ''
user_email: 'metal@i0.tf'
user_name: 'metal0'
- name: Publish to all guilds
run: npm run publish --if-present
env:
API_TOKEN: ${{secrets.PYLON_API_KEY}}
WEBHOOK_URL: ${{secrets.WEBHOOK_URL}}
GITHUB: true