-
Notifications
You must be signed in to change notification settings - Fork 12
56 lines (49 loc) · 1.47 KB
/
web.yml
File metadata and controls
56 lines (49 loc) · 1.47 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
name: "WEB"
on:
push:
branches:
- 'master'
jobs:
docgen:
name: Web
runs-on: ubuntu-latest
steps:
- name: Setup git
run: |
git config --global user.name "FNAPIcomBot"
git config --global user.email 110248282+FNAPIcomBot@users.noreply.github.com
- name: Set Up NodeJS
uses: actions/setup-node@v2
with:
node-version: 22
- name: Checkout Master Branch
uses: actions/checkout@v2
with:
path: master
- name: Checkout Web Branch
uses: actions/checkout@v2
with:
path: web
ref: web
- name: Install Master Branch Dependencies
working-directory: ./master
run: npm ci
- name: Build Web Version
working-directory: ./master
run: npm run buildWeb
- uses: actions-ecosystem/action-regex-match@v2
id: current_branch
with:
text: ${{ github.ref }}
regex: '(?<=\/)(\w|\d|\.)+$'
- name: Commit And Push Web Version
working-directory: ./web
shell: bash
env:
CURRENT_BRANCH: ${{ steps.current_branch.outputs.match }}
run: |
git pull
mv ../master/FNAPIcom.js ./FNAPIcom.js
git add . -A
git diff-index --quiet HEAD || git commit -m "Built for ${CURRENT_BRANCH}: ${GITHUB_SHA}"
git push https://FNAPIcomBot:${{ secrets.BOT_PAT }}@github.com/Fortnite-API/nodejs-wrapper web