Skip to content

Commit

Permalink
ci(github): add workflow build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
remarkablemark committed Jan 15, 2024
1 parent 9783220 commit 8d8898c
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: build
on: [push, pull_request]

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Use Node.js
uses: actions/setup-node@v4
with:
cache: npm
node-version-file: .nvmrc

- name: Install dependencies
run: npm ci --prefer-offline

- name: Lint commit message
run: npx commitlint --from=HEAD~1

- name: Run ESLint
run: npm run lint

- name: Type check
run: npm run lint:tsc

- name: Build
run: npm run build -- --base /${{ github.event.repository.name }}/

- name: Deploy
if: github.ref_name == 'master'
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: dist

0 comments on commit 8d8898c

Please sign in to comment.