Delete source/_posts/2024_06_19_12_31 directory #47
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Hexo pages | |
on: | |
push: | |
branches: | |
- main # 当推送到 main 分支时触发 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
submodules: false # 禁用子模块检查 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '18' | |
- name: 安装依赖 | |
run: npm install | |
- name: 安装hexo | |
run: | | |
npm install hexo-deployer-git --save | |
npm install hexo-cli -g | |
- name: 创建blog页面 | |
run: | | |
git clone https://github.com/wyxdlz54188/butterfly.git themes/butterfly | |
hexo clean | |
hexo generate | |
- name: 设置Git配置 | |
run: | | |
git config --global user.name 'wyxdlz54188' | |
git config --global user.email '[email protected]' | |
- name: 上传GitHub pages | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
run: | | |
cd public/ | |
git init | |
git add -A | |
git commit -m "Create by workflows" | |
git remote add origin https://${{ secrets.GH_TOKEN }}@github.com/wyxdlz54188/wyxdlz54188.github.io.git | |
git push origin HEAD:gh-pages -f | |