chore: auto deploy #116
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check | |
on: | |
pull_request: | |
types: | |
- labeled | |
- synchronize | |
- opened | |
- ready_for_review | |
- reopened | |
jobs: | |
check_ci: | |
runs-on: ubuntu-latest | |
if: ${{!contains(github.event.pull_request.labels.*.name, 'run-ci')}} | |
steps: | |
- run: | | |
echo "::warning file=.github/workflows/pr-check.yml,line=1,col=1,endColumn=1::Please request reviews" | |
exit 101 | |
lint: | |
name: Lint | |
if: contains(github.event.pull_request.labels.*.name, 'run-ci') | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@main | |
with: | |
fetch-depth: 20 | |
- uses: actions/setup-node@main | |
with: | |
node-version: 16 | |
registry-url: https://registry.npmjs.org/ | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 7.1.0 | |
- name: Get pnpm store directory | |
id: pnpm-cache | |
run: echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v3 | |
id: use-pnpm-cache # use this to check for `cache-hit` (`steps.pnpm-cache.outputs.cache-hit != 'true'`) | |
with: | |
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} | |
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: ${{ runner.os }}-pnpm- | |
- run: pnpm install | |
- run: pnpm run build | |
- run: pnpm run lint | |
- run: pnpm run commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose |