Skip to content

Commit

Permalink
Update JS build action
Browse files Browse the repository at this point in the history
  • Loading branch information
imorland committed Jun 17, 2021
1 parent d8ea092 commit 9c3b9f7
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build JavaScript assets
name: JavaScript

on:
push:
Expand All @@ -7,10 +7,25 @@ on:

jobs:
build:
name: JS / Build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master
- uses: flarum/action-build@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check out code
uses: actions/checkout@v2

- 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-
# Flarum action will install npm, cd into `./js`, run `npm run build` and
# `npm run build-typings`, then commit and upload any changes
- name: Build production JS
uses: flarum/action-build@2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
build_script: build
package_manager: npm

0 comments on commit 9c3b9f7

Please sign in to comment.