使用obsidian发布博客

Wed 18 January 2023

使用 github action 发布

name: deploy  
  
on:  
  push:  
  workflow_dispatch:  
  schedule:  
  # Runs everyday at 8:00 AM  
  - cron: "0 0 * * *"  
  
jobs:  
  build:  
    runs-on: ubuntu-latest  
    steps:  
    - name: Checkout  
      uses: actions/checkout@v2  
      with:  
        submodules: true  
        fetch-depth: 0  
  
    - name: Setup Hugo  
      uses: peaceiris/actions-hugo@v2  
      with:  
        hugo-version: "latest"  
  
    - name: Build Web  
      run: hugo  
  
    - name: Deploy Web  
      uses: peaceiris/actions-gh-pages@v3  
      with:  
        PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }}  
        EXTERNAL_REPOSITORY: justinbetter/justinbetter.github.io  
        PUBLISH_BRANCH: master  
        PUBLISH_DIR: ./public  
        commit_message: ${{ github.event.head_commit.message }}

参考