Update main.yml
This commit is contained in:
parent
63bd19cc11
commit
d72e4ec4d4
1 changed files with 13 additions and 1 deletions
14
.github/workflows/main.yml
vendored
14
.github/workflows/main.yml
vendored
|
@ -18,6 +18,18 @@ jobs:
|
||||||
|
|
||||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||||
steps:
|
steps:
|
||||||
|
- name: Get yarn cache directory path
|
||||||
|
id: yarn-cache-dir-path
|
||||||
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||||
|
|
||||||
|
- uses: actions/cache@v1
|
||||||
|
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-
|
||||||
|
|
||||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
@ -36,7 +48,7 @@ jobs:
|
||||||
- name: Prettify the JS Code
|
- name: Prettify the JS Code
|
||||||
uses: creyD/prettier_action@v2.1
|
uses: creyD/prettier_action@v2.1
|
||||||
with:
|
with:
|
||||||
prettier_options: '--write *.{js,ts,tsx}'
|
prettier_options: '--write src/**/*.{js,ts,tsx,css,scss}'
|
||||||
branch: master
|
branch: master
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
Loading…
Reference in a new issue