Closed cunyu1943 closed 1 year ago
6.x
https://github.com/cunyu1943/cunyu1943.github.io/blob/volantis
name: 自动部署 # 当有改动推送到master分支时,启动Action on: push: branches: - main # 2020年10月后github新建仓库默认分支改为main,注意更改 release: types: - published jobs: deploy: runs-on: ubuntu-latest steps: - name: 检查分支 uses: actions/checkout@v3 with: ref: main - name: 安装 Node uses: actions/setup-node@v3 with: node-version: latest - name: 安装 Hexo run: | export TZ='Asia/Shanghai' npm install hexo-cli -g - name: 缓存 Hexo id: cache-npm uses: actions/cache@v3 env: cache-name: cache-node-modules with: path: node_modules key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} restore-keys: | ${{ runner.os }}-build-${{ env.cache-name }}- ${{ runner.os }}-build- ${{ runner.os }}- - name: 安装依赖 if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }} run: | npm install --save - name: 生成静态文件 run: | hexo clean hexo generate - name: 部署到Github uses: JamesIves/github-pages-deploy-action@v4.4.2 with: token: ${{ secrets.TOKEN }} repository-name: username/repo branch: volantis folder: public commit-message: "${{ github.event.head_commit.message }}"
No response
我之前遇到过这样的问题,当时是node版本太低了。你换成16或者18试试?
node 版本就是 18
本地生成会有问题吗
没有问题,后来换成 5.x 版本就好使了
检查清单
主题版本
6.x
复现地址
https://github.com/cunyu1943/cunyu1943.github.io/blob/volantis
问题描述
配置文件
环境信息
No response