CyberChef/.github/workflows/master.yml

56 lines
1.1 KiB
YAML
Raw Normal View History

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