2019-08-21 06:05:04 +08:00
|
|
|
name: JavaScript
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2021-04-03 08:00:26 +08:00
|
|
|
name: JS / Build
|
2019-08-21 06:05:04 +08:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2021-04-03 08:00:26 +08:00
|
|
|
- name: Check out code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
2021-04-09 03:29:37 +08:00
|
|
|
- name: Restore npm cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: ~/.npm
|
|
|
|
key: ${{ runner.os }}-node-${{ hashFiles('js/package-lock.json') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-node-
|
|
|
|
|
2021-05-13 07:28:17 +08:00
|
|
|
# Our action will install npm, cd into `./js`, run `npm run build` and
|
|
|
|
# `npm run build-typings`, then commit and upload any changes
|
2021-04-03 08:00:26 +08:00
|
|
|
- name: Build production JS
|
2021-05-13 07:28:17 +08:00
|
|
|
uses: flarum/action-build@2
|
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
build_script: build
|
|
|
|
package_manager: npm
|
|
|
|
typings_script: build-typings
|