Use github actions
This commit is contained in:
33
.github/workflows/build.yaml.txt
vendored
Normal file
33
.github/workflows/build.yaml.txt
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
name: Build site
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- '.github/workflows/build.yml'
|
||||
- 'README.md'
|
||||
|
||||
jobs:
|
||||
build_site:
|
||||
runs-on: ubuntu-latest
|
||||
name: Build site
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
with:
|
||||
fetch-depth: 1
|
||||
- uses: actions/setup-node@master
|
||||
with:
|
||||
node-version: '12.x'
|
||||
- name: Determine npm cache directory
|
||||
id: npm-cache
|
||||
run: |
|
||||
echo "::set-output name=dir::$(npm config get cache)"
|
||||
- name: Restore npm cache
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ${{ steps.npm-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-
|
||||
- run: npm run build
|
||||
Reference in New Issue
Block a user