-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (33 loc) · 1008 Bytes
/
rust.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
name: Rust + Webpack
on:
- push
- pull_request
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: Test on node ${{ matrix.node_version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
node_version: ['10', '12']
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node_version }}
- name: yarn install, build and test
run: |
yarn
yarn test
- name: Build game
run: yarn build && cp static/* dist/
if: matrix.os == 'ubuntu-latest' && matrix.node_version == '12'
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
if: github.ref == 'refs/heads/master' && matrix.os == 'ubuntu-latest' && matrix.node_version == '12'