CyberChef/.github/workflows/master.yml

55 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:
push:
branches:
- master
jobs:
2021-01-22 16:33:15 +01:00
main:
runs-on: ubuntu-latest
steps:
2020-07-04 16:35:49 +02:00
- uses: actions/checkout@v2
2021-01-22 16:33:15 +01:00
2021-01-22 16:27:42 +01:00
- name: Set node version
2021-01-22 15:53:53 +01:00
uses: actions/setup-node@v1
with:
2022-03-25 15:59:54 +01:00
node-version: '17.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
npx grunt 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'
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: gh-pages
build_dir: ./build/prod
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}