0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-06 20:40:08 -05:00
logto/.github/workflows/ui-main.yml

43 lines
1,008 B
YAML
Raw Normal View History

2021-07-25 12:11:38 -05:00
name: UI
2021-07-11 09:28:35 -05:00
on:
push:
branches: [ master ]
2021-07-25 12:11:38 -05:00
paths: [ 'packages/ui/**' ]
2021-07-11 09:28:35 -05:00
pull_request:
branches: [ master ]
2021-07-25 12:11:38 -05:00
paths: [ 'packages/ui/**' ]
2021-07-25 12:03:54 -05:00
defaults:
run:
working-directory: packages/ui
2021-07-11 09:28:35 -05:00
jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# https://github.com/actions/cache/blob/main/examples.md#node---yarn
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install packages
run: yarn
- name: Lint
run: yarn lint && yarn stylelint
- name: Build
run: yarn build