Skip to content

参考作者的自动部署脚本想把博客换成Github Action 部署总是报错有不支持的语法 #1217

Closed Answered by JIeJaitt
JIeJaitt asked this question in Q&A
Discussion options

You must be logged in to vote

解决了,需要把主题的仓库设为子模块。这里分享下我的脚本:

name: Build and Deploy Hexo

on:
  push:
    branches:
      - main
jobs:
  build-and-deploy:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout 🛎️
      uses: actions/checkout@master
      with:
        submodules: true

    - name: Use Node.js 16
      uses: actions/setup-node@v2-beta
      with:
        node-version: '16'

    - name: update Theme 🎨 
      run: git submodule update --remote themes/icarus
        
    - name: Install and Build 🔧 
      run: |
        npm install -g hexo-cli
        npm install
        hexo clean
        hexo generate

    - name: Deploy 🚀
      uses: JamesIves/[email protected]
      with:
        GITH…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by JIeJaitt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant