Skip to content

merge(main): 解决 PR #102 与 main 的冲突 #561

merge(main): 解决 PR #102 与 main 的冲突

merge(main): 解决 PR #102 与 main 的冲突 #561

Workflow file for this run

name: build
on:
push:
branches: [main]
paths:
- 'posts/**'
- 'post/**'
- 'data/posts.json'
- 'assets/js/config.js'
- 'assets/js/post.js'
- 'post.html'
- 'index.html'
- 'scripts/build.mjs'
- 'scripts/markdown-render.mjs'
- 'scripts/prerender-post-html.mjs'
- 'package.json'
- 'package-lock.json'
- 'sw.js'
- 'tools/**'
- 'tool-*.html'
- 'tools.html'
- 'tool-kit.html'
- 'scripts/generate-tool-pages.mjs'
- 'scripts/tool-page-shell.mjs'
- '.github/workflows/build.yml'
workflow_dispatch:
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
concurrency:
group: build-${{ github.ref }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm ci
- name: Generate sitemap / rss / prerender posts
run: npm run build
- name: Commit if changed
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add sitemap.xml rss.xml robots.txt manifest.webmanifest data/posts.json data/search.json assets/og post post.html sw.js
git add index.html
if git diff --cached --quiet; then
echo "No changes to commit"
else
git commit -m "build: regenerate sitemap / rss [skip ci]"

Check failure on line 62 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build.yml

Invalid workflow file

You have an error in your yaml syntax on line 62
git push
fi