From fa428faa45e2ce9e0565206ba7eba09c8135b0fd Mon Sep 17 00:00:00 2001 From: 0xDragon888 Date: Wed, 18 Sep 2024 02:40:20 +0800 Subject: [PATCH] Update GitHub Actions workflow and add .nojekyll file --- .github/workflows/deploy.yml | 18 +++++++----------- docs/.vuepress/config.js | 2 +- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 7a3e94a..1b96067 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -14,19 +14,15 @@ jobs: - uses: actions/setup-node@v4 with: node-version: '20' - - name: Debug - Show current directory and structure - run: | - pwd - ls -R - name: Install dependencies - run: | - npm install - npm list --depth=0 + run: npm ci - name: Build site run: npm run build - - name: Debug - List build output - run: ls -R docs/.vuepress/dist - - uses: peaceiris/actions-gh-pages@v3 + - name: Create .nojekyll file + run: touch docs/.vuepress/dist/.nojekyll + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: docs/.vuepress/dist \ No newline at end of file + publish_dir: docs/.vuepress/dist + force_orphan: true \ No newline at end of file diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index ed4240b..829aa36 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -1,5 +1,5 @@ module.exports = { - base: '/', // 如果这是您的用户页面 (username.github.io),base 应该是 '/' + base: '/lvxuan149.github.io', // 如果您的仓库名是 lvxuan149.github.io,保持这个设置 title: "0xDragon888's blog", description: '积跬步,记当下,好奇心,定瞬间。', theme: 'vdoing',