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 working-directory: website
steps: steps:
- uses: actions/checkout@v4 - 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 - name: Deploy to Vercel
uses: amondnet/vercel-action@v25.1.1 uses: amondnet/vercel-action@v25.1.1
env: env:
@ -38,4 +28,4 @@ jobs:
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: prj_V3iY3AcH0wIXxMHW4oDy3W3XzfnN vercel-project-id: prj_V3iY3AcH0wIXxMHW4oDy3W3XzfnN
working-directory: ./ 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'), require.resolve('./src/css/custom.css'),
], ],
}, },
sitemap: { // need .git file, not easy build in vercel with cli, ignore now
lastmod: 'date', // sitemap: {
changefreq: 'weekly', // lastmod: 'date',
priority: 0.5, // changefreq: 'weekly',
ignorePatterns: ['/tags/**'], // priority: 0.5,
filename: 'sitemap.xml', // ignorePatterns: ['/tags/**'],
createSitemapItems: async (params) => { // filename: 'sitemap.xml',
const { defaultCreateSitemapItems, ...rest } = params; // createSitemapItems: async (params) => {
const items = await defaultCreateSitemapItems(rest); // const { defaultCreateSitemapItems, ...rest } = params;
return items.filter((item) => !item.url.includes('/page/')); // const items = await defaultCreateSitemapItems(rest);
}, // return items.filter((item) => !item.url.includes('/page/'));
}, // },
// },
}, },
], ],
], ],