chore: comment sitemap to make sure its can build safe

This commit is contained in:
moonrailgun 2024-10-08 23:39:45 +08:00
parent e51a88044f
commit 9b9799ec6f
2 changed files with 14 additions and 23 deletions

View File

@ -19,16 +19,6 @@ jobs:
working-directory: website
steps:
- uses: actions/checkout@v4
- name: Pre build
uses: amondnet/vercel-action@v25.1.1
env:
VERSION: ${{ env.GITHUB_SHA }}
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: prj_V3iY3AcH0wIXxMHW4oDy3W3XzfnN
working-directory: ./
vercel-args: 'build'
- name: Deploy to Vercel
uses: amondnet/vercel-action@v25.1.1
env:
@ -38,4 +28,4 @@ jobs:
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: prj_V3iY3AcH0wIXxMHW4oDy3W3XzfnN
working-directory: ./
vercel-args: 'deploy --prebuilt --prod'
vercel-args: '--prod'

View File

@ -57,18 +57,19 @@ const config: Config = {
require.resolve('./src/css/custom.css'),
],
},
sitemap: {
lastmod: 'date',
changefreq: 'weekly',
priority: 0.5,
ignorePatterns: ['/tags/**'],
filename: 'sitemap.xml',
createSitemapItems: async (params) => {
const { defaultCreateSitemapItems, ...rest } = params;
const items = await defaultCreateSitemapItems(rest);
return items.filter((item) => !item.url.includes('/page/'));
},
},
// need .git file, not easy build in vercel with cli, ignore now
// sitemap: {
// lastmod: 'date',
// changefreq: 'weekly',
// priority: 0.5,
// ignorePatterns: ['/tags/**'],
// filename: 'sitemap.xml',
// createSitemapItems: async (params) => {
// const { defaultCreateSitemapItems, ...rest } = params;
// const items = await defaultCreateSitemapItems(rest);
// return items.filter((item) => !item.url.includes('/page/'));
// },
// },
},
],
],