Skip to content

remove obsidian stuff #92

remove obsidian stuff

remove obsidian stuff #92

Workflow file for this run

# ref: http://www.ruanyifeng.com/blog/2019/09/getting-started-with-github-actions.html
# see: https://gist.github.com/lisez/41cebe4eb9190a5c5e879fee5933beb1
# ref: https://immmmm.com/hugo-github-actions/
name: Blog deploy # as you like
on:
push:
branches:
- src # trigger time
env:
TZ: Asia/Shanghai
jobs:
blog-deploy:
name: Hugo blog build & deploy
runs-on: ubuntu-latest
steps:
- name: Checkout src
uses: actions/checkout@v3
with:
submodules: true
# perform a deep clone, see: https://gohugo.io/methods/page/gitinfo/#hosting-considerations
fetch-depth: 0
## Too hard to pass!
# - name: AutoCorrect
# uses: huacnlee/autocorrect-action@main
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: latest
extended: true
- name: Build
run: hugo --config even-config.toml --minify --gc --cleanDestinationDir
- name: Deploy to master
uses: peaceiris/actions-gh-pages@v2
env:
PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
PUBLISH_BRANCH: master
PUBLISH_DIR: ./public
notify-homelab:
needs: blog-deploy
runs-on: ubuntu-latest
steps:
- name: Send webhook to remote server
run: |
PAYLOAD='{
"repo": "${{ github.repository }}",
"ref": "${{ github.ref }}",
"sha": "${{ github.sha }}",
"event_name": "${{ github.event_name }}",
"job": "${{ github.job }}",
"status": "success"
}'
curl -X POST "${{ secrets.WEBHOOK_URL }}" \
-H "Content-Type: application/json" \
-H "X-Webhook-Signature: sha256=$(echo -n "$PAYLOAD" | \
openssl dgst -sha256 -hmac '${{ secrets.WEBHOOK_SECRET }}' | \
sed 's/^.* //')" \
-d "$PAYLOAD"