mirror of
https://github.com/withastro/astro.git
synced 2024-12-23 21:53:55 -05:00
c5361a131d
* upgraded workflow actions * removed unnecessary envs + some formatting * removed extra instruction * bumped pnpm version
31 lines
724 B
YAML
31 lines
724 B
YAML
name: 'Format Code'
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
format:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out code using Git
|
|
uses: actions/checkout@v3
|
|
with:
|
|
ref: ${{ github.head_ref }}
|
|
- name: Setup PNPM
|
|
uses: pnpm/action-setup@v2.2.1
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 16
|
|
cache: 'pnpm'
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
- name: Format code
|
|
run: pnpm run format
|
|
- name: Commit changes
|
|
uses: stefanzweifel/git-auto-commit-action@v4
|
|
with:
|
|
commit_message: '[ci] format'
|
|
branch: ${{ github.head_ref }}
|