2021-02-10 18:37:46 +00:00
|
|
|
name: "Master Build, Test & Deploy"
|
2019-09-30 12:51:38 +00:00
|
|
|
|
2019-09-30 13:41:14 +00:00
|
|
|
on:
|
2022-03-25 15:24:21 +00:00
|
|
|
workflow_dispatch:
|
2019-09-30 13:41:14 +00:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
2019-09-30 12:51:38 +00:00
|
|
|
|
|
|
|
jobs:
|
2021-01-22 15:33:15 +00:00
|
|
|
main:
|
2019-09-30 12:51:38 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2020-07-04 14:35:49 +00:00
|
|
|
- uses: actions/checkout@v2
|
2021-01-22 15:33:15 +00:00
|
|
|
|
2021-01-22 15:27:42 +00:00
|
|
|
- name: Set node version
|
2021-01-22 14:53:53 +00:00
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
2022-09-09 20:22:55 +00:00
|
|
|
node-version: '18.x'
|
2021-01-22 15:33:15 +00:00
|
|
|
|
2021-01-22 15:27:42 +00:00
|
|
|
- name: Install
|
2019-09-30 12:51:38 +00:00
|
|
|
run: |
|
2021-01-22 14:53:53 +00:00
|
|
|
npm install
|
2021-02-12 13:51:51 +00:00
|
|
|
npm run setheapsize
|
2021-01-22 15:27:42 +00:00
|
|
|
|
2019-09-30 12:51:38 +00:00
|
|
|
- name: Lint
|
2019-09-30 12:56:26 +00:00
|
|
|
run: npx grunt lint
|
2021-01-22 15:27:42 +00:00
|
|
|
|
2019-09-30 12:51:38 +00:00
|
|
|
- name: Unit Tests
|
|
|
|
run: |
|
2021-01-22 14:33:35 +00:00
|
|
|
npm test
|
2022-03-28 14:42:11 +00:00
|
|
|
npm run testnodeconsumer
|
2021-01-22 15:27:42 +00:00
|
|
|
|
2021-01-22 14:59:26 +00:00
|
|
|
- name: Production Build
|
2021-02-01 14:10:21 +00:00
|
|
|
if: success()
|
2021-01-22 14:59:26 +00:00
|
|
|
run: npx grunt prod
|
2021-01-22 15:33:15 +00:00
|
|
|
|
2021-01-22 15:17:17 +00:00
|
|
|
- name: Generate sitemap
|
|
|
|
run: npx grunt exec:sitemap
|
2021-01-22 15:27:42 +00:00
|
|
|
|
2021-08-10 13:26:33 +00:00
|
|
|
# - name: UI Tests
|
|
|
|
# if: success()
|
|
|
|
# run: xvfb-run --server-args="-screen 0 1200x800x24" npx grunt testui
|
2021-01-22 15:27:42 +00:00
|
|
|
|
2021-01-22 17:15:58 +00:00
|
|
|
- name: Prepare for GitHub Pages
|
2021-02-01 14:18:17 +00:00
|
|
|
if: success()
|
2021-01-22 17:15:58 +00:00
|
|
|
run: npx grunt copy:ghPages
|
|
|
|
|
2021-01-22 17:13:17 +00:00
|
|
|
- name: Deploy to GitHub Pages
|
|
|
|
if: success() && github.ref == 'refs/heads/master'
|
|
|
|
uses: crazy-max/ghaction-github-pages@v2
|
|
|
|
with:
|
|
|
|
target_branch: gh-pages
|
|
|
|
build_dir: ./build/prod
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|