Maktub_Wiki Maktub_Wiki
主站 (opens new window)
  • 服务搭建
  • 网络服务
  • 开源框架
  • 操作系统
  • iOS/MacOS
  • 算法导论(Python)
  • Leetcode
  • 线性代数
主站 (opens new window)
  • 服务搭建
  • 网络服务
  • 开源框架
  • 操作系统
  • iOS/MacOS
  • 算法导论(Python)
  • Leetcode
  • 线性代数
  • Node.js

    • 脚本
  • Git

    • Github Actions
    • Caddy

      • 基础配置
      • abort应用
      • Caddy加速Docker
      • Caddy加速OpenAi api
    • V2ray

      • 入口分流
    • Realm

      • 多端口转发
    • Docker

      • 配置
    • NextCloud
    • Hexo
    • vuepress-theme-vdoing
    • 开源框架
    • Git
    Maktub_小明
    2024-03-10
    目录

    Github Actions

    # 博客自动部署

    name: Build and Update Github Pages
    on: push
    jobs:
      build:
        runs-on: ubuntu-latest
        steps:
          # 配置Node环境
          - name: Use Node.js 10.x
            uses: actions/setup-node@v1
            with:
              node-version: "18.16.0"
          # 拉取代码
          - uses: actions/checkout@v4
    
          # 安装hexo和生成静态文件
          - name: Build
            run: |
              npm i -g hexo-cli
              npm i
              hexo generate
          # 部署文件
          - name: Deploy
            uses: JamesIves/github-pages-deploy-action@v4
            with:
              repository-name: <Pages分支>
              ssh-key: ${{ secrets.ACTION_DEPLOY_KEY }}
              folder: ./public
              single-commit: true
              force: true
              branch: master
    
          # 拉取Pages网页分支
          - uses: actions/checkout@v4
            with:
              repository: <Pages分支>
              ssh-key: ${{ secrets.ACTION_DEPLOY_KEY }}
              ref: master
          # 清除提交记录
          - name: Clear
            run: |
              git config --global user.email "[email protected]"
              git config --global user.name "example"
              git checkout --orphan temp_branch
              git add -A
              git commit -m "Keep only latest commit"
              git branch -D master
              git branch -m master
              git push -f origin master
    
    
    上次更新: 2025/03/22, 03:52:10
    脚本
    基础配置

    ← 脚本 基础配置→

    Theme by Vdoing | Copyright © 2021-2025 Maktub_小明 | MIT License
    • 跟随系统
    • 浅色模式
    • 深色模式
    • 阅读模式