2021-03-26 19:45:53 +00:00
|
|
|
name: 'Format Code'
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
format:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-11-02 14:13:36 +00:00
|
|
|
- name: Check out code using Git
|
|
|
|
uses: actions/checkout@v2
|
2021-03-26 19:45:53 +00:00
|
|
|
with:
|
|
|
|
ref: ${{ github.head_ref }}
|
2021-11-02 14:13:36 +00:00
|
|
|
- name: Set Node version to 16
|
|
|
|
uses: actions/setup-node@v2
|
2021-03-26 19:45:53 +00:00
|
|
|
with:
|
2021-11-02 14:13:36 +00:00
|
|
|
node-version: 16
|
|
|
|
cache: 'yarn'
|
|
|
|
- name: Install dependencies
|
|
|
|
run: yarn --frozen-lockfile --ignore-engines
|
2021-04-30 21:33:35 +00:00
|
|
|
env:
|
|
|
|
CI: true
|
2021-06-07 20:05:13 +00:00
|
|
|
- run: yarn lerna run build --scope @astrojs/parser
|
2021-11-02 14:13:36 +00:00
|
|
|
- name: Format code
|
|
|
|
run: yarn format
|
2021-03-26 19:45:53 +00:00
|
|
|
- name: Commit changes
|
|
|
|
uses: stefanzweifel/git-auto-commit-action@v4
|
|
|
|
with:
|
2021-04-30 21:33:35 +00:00
|
|
|
commit_message: '[ci] yarn format'
|
2021-03-26 19:45:53 +00:00
|
|
|
branch: ${{ github.head_ref }}
|