Skip to content

Merge pull request #50 from Fortnite-API/dependabot/npm_and_yarn/axio… #20

Merge pull request #50 from Fortnite-API/dependabot/npm_and_yarn/axio…

Merge pull request #50 from Fortnite-API/dependabot/npm_and_yarn/axio… #20

Workflow file for this run

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 [email protected]
- 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