chore: update submodules #260
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: Deploy Hugo from Obsidian notes | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
publish_job: | |
runs-on: ubuntu-latest | |
name: Publish Obsidian notes to Github pages | |
steps: | |
- name: Checkout contents repo | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GH_PAT }} | |
submodules: recursive | |
- name: Cache cargo plugins | |
id: cache-obsidian-export | |
uses: actions/cache@v1 | |
with: | |
path: ~/.cargo/bin/ | |
key: ${{ runner.os }}-cargo-plugins | |
- name: Install obsidian-export | |
if: steps.cache-obsidian-export.outputs.cache-hit != 'true' | |
uses: actions-rs/[email protected] | |
with: | |
crate: obsidian-export | |
version: latest | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
hugo-version: 'latest' | |
extended: true | |
- name: Create content dir if not exists | |
shell: bash | |
run: mkdir -p ./content | |
- name: Export Vault | |
shell: bash | |
run: obsidian-export --hard-linebreaks ./vault ./content | |
- name: Build Hugo | |
shell: bash | |
run: hugo -DEF --minify | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
if: ${{ github.ref == 'refs/heads/main' }} | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./public |