chore(deps): update lycheeverse/lychee-action action to v2 #144
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: TEST_BUILD | |
on: | |
workflow_call: | |
pull_request: | |
branches: [next, main] | |
types: [opened, synchronize, reopened] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node_version: | |
- 20 | |
steps: | |
- uses: actions/checkout@main | |
with: | |
# “最近更新时间” 等 git 日志相关信息,需要拉取全部提交记录 | |
fetch-depth: 0 | |
- uses: pnpm/action-setup@v4 | |
name: Install pnpm | |
with: | |
run_install: false | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install | |
# 构建 | |
- name: Refresh Blog Data | |
run: pnpm build-blog | |
- name: Build | |
run: pnpm site:preview | |
- name: Build lunaria | |
run: pnpm lunaria:build | |
- run: | | |
zip -r _site.zip ./dist | |
- name: upload _site artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: _site | |
path: _site.zip | |
retention-days: 5 | |
- name: Save PR number | |
if: ${{ always() }} | |
run: echo ${{ github.event.number }} > ./pr-id.txt | |
- name: Upload PR number | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: pr | |
path: ./pr-id.txt |