Skip to content
This repository has been archived by the owner on Jul 19, 2023. It is now read-only.

deploy

deploy #855

Workflow file for this run

name: deploy
on:
workflow_dispatch:
push:
branches:
- hugo
watch:
types: [started]
# schedule:
# - cron: "0 */2 * * *"
jobs:
deploy:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Pull & update submodules recursively
run: |
git submodule update --init --recursive
git submodule update --recursive --remote
- name: Commit
run: |
git config user.email "85010507+notbarze@users.noreply.github.com"
git config user.name "narze's bot"
git add --all
git commit -m "Update submodules" || echo "No changes to commit"
git push
- name: Build Link Index
uses: jackyzha0/hugo-obsidian@v2.18
with:
index: true
input: content
output: assets/indices
root: .
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.96.0'
extended: true
- name: Build
run: hugo --minify
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
user_name: "narze's bot"
user_email: "85010507+notbarze@users.noreply.github.com"
publish_dir: ./public
publish_branch: master # deploying branch
cname: garden.narze.live