Skip to content

feat: add read time and word count #84

feat: add read time and word count

feat: add read time and word count #84

Workflow file for this run

name: Build website
on:
workflow_dispatch:
workflow_call:
pull_request:
concurrency:
group: web-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: latest
run_install: true
- name: Setup Node.js
uses: actions/setup-node@v4
with:
cache: pnpm
node-version: current
- name: Build
env:
NODE_OPTIONS: --max_old_space_size=4096
run: |
sed -e "s/BUILD_TIME/$(TZ=Asia/Shanghai date -Isecond)/" -e "s/COMMIT_SHA/${{ github.sha }}/" -i src/about.md
pnpm run build
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: website
path: src/.vitepress/dist/