mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-07-19 17:45:31 -04:00
Update and rename build.yml to build-and-lint.yml
This commit is contained in:
48
.github/workflows/build-and-lint.yml
vendored
Normal file
48
.github/workflows/build-and-lint.yml
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
name: Build and Lint
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 1
|
||||
lfs: false
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: "12.x"
|
||||
# https://github.com/actions/cache/blob/master/examples.md#node---yarn
|
||||
# https://github.com/actions/cache/issues/60
|
||||
- name: Get yarn cache location
|
||||
id: yarn-cache
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
- name: Cache dependencies
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ${{ steps.yarn-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
- name: Install dependencies
|
||||
run: yarn install --no-ignore-optional --frozen-lockfile
|
||||
- name: Hugo version
|
||||
run: yarn debug:hugo
|
||||
- name: Build Hugo
|
||||
run: yarn build:preview
|
||||
- name: Lint Styles
|
||||
run: yarn lint:sass
|
||||
- name: Lint Markdown
|
||||
run: yarn lint:markdown
|
||||
- uses: actions/upload-artifact@v1
|
||||
if: github.event_name == 'pull_request'
|
||||
with:
|
||||
name: public
|
||||
path: './public'
|
Reference in New Issue
Block a user