docs(readme): fix typo #43
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: Lint, Test, and Publish | |
on: | |
push: | |
pull_request: | |
jobs: | |
main: | |
permissions: | |
contents: write # Let the bot push to main | |
issues: write | |
pull-requests: write # Let the bot comment on PR | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # For haetae | |
- name: Checkout PR into branch | |
if: ${{ github.event_name == 'pull_request' }} | |
# On GitHub Actions, PR and tag are not to be checked out into a branch, but "detached HEAD". | |
# Only push is checked out into a branch. | |
# This check out the PR into a branch. | |
run: | | |
git checkout ${GITHUB_HEAD_REF#refs/heads/} || git checkout -b ${GITHUB_HEAD_REF#refs/heads/} && git pull | |
- name: Set up pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
run_install: false # For cache | |
# pnpm should be installed before the setup-node action. REF: https://github.com/actions/setup-node/issues/530 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: '.nvmrc' | |
cache: pnpm | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Lint | |
run: pnpm eslint . | |
- name: Lint markdown | |
run: pnpm markdownlint . | |
- name: Lint glossary | |
run: pnpm lint:csv | |
- name: Lint config | |
run: pnpm lint:config | |
- name: Test | |
run: pnpm test | |
- name: Cache haetae | |
uses: actions/cache@v3 | |
with: | |
path: .haetae | |
key: main-haetae-${{ github.ref }}-${{ github.sha }} | |
restore-keys: | | |
main-haetae-${{ github.ref }}- | |
main-haetae- | |
- name: haetae publish | |
if: github.ref == 'refs/heads/main' || github.event_name == 'pull_request' | |
run: | | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git config --global user.name "github-actions[bot]" | |
pnpm haetae publish | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
JJANGGA0214_DEVTO_API_KEY: ${{ secrets.JJANGGA0214_DEVTO_API_KEY }} |