-
Notifications
You must be signed in to change notification settings - Fork 4
62 lines (52 loc) · 1.83 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Test
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: coursier/cache-action@v6
- uses: olafurpg/setup-scala@v12
- uses: actions/cache@v2
name: Cache node_modules
with:
path: "node_modules"
key: ${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock') }}
restore-keys: ${{ runner.os }}-node_modules
- uses: actions/cache@v2
name: Cache scalajs-bundler node_modules
with:
path: "*/target/**/main/node_modules"
key: ${{ runner.os }}-scalajsbundler-node_modules-${{ hashFiles('*/yarn.lock') }}
restore-keys: ${{ runner.os }}-scalajsbundler-node_modules
- name: Cache Scalablytyped transpilations
uses: actions/cache@v2
with:
path: |
~/.ivy2/local/org.scalablytyped
~/.cache/scalablytyped
key: ${{ runner.os }}-scalablytyped-${{ hashfiles('build.sbt') }}-${{ hashFiles('*/yarn.lock') }}
restore-keys: |
${{ runner.os }}-scalablytyped-
- name: Build and Test
run: sbt scalafmtCheckAll test fastOptJS/webpack
- name: Build production assets
if: github.ref == 'refs/heads/master'
run: |
sbt prod
- name: Deploy to Github Pages
if: github.ref == 'refs/heads/master'
uses: JamesIves/[email protected]
with:
branch: gh-pages # The branch the action should deploy to.
folder: webapp/target/scala-2.13/scalajs-bundler/main/dist # The folder the action should deploy.
# - name: Debug over SSH (tmate)
# # if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
# with:
# limit-access-to-actor: true