added new post #79
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: Blog of hugozhu.myalert.info | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
checks: | |
name: run | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
token: ${{ secrets.TOKEN }} | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.16 | |
- name: Install gor | |
run: | | |
go version | |
go install github.com/hugozhu/gor/gor@latest | |
- name: Clone blog | |
run: | | |
mkdir compiled | |
git clone https://github.com/hugozhu/hugozhu.github.com compiled | |
- name: Compile blog | |
run: | | |
gor compile | |
- name: Publish blog | |
run: | | |
cd compiled | |
git status | |
git config --global user.name "Hugo Zhu" | |
git config --global user.email "hugozhu@gmail.com" | |
git remote set-url origin https://x-access-token:${{ secrets.TOKEN }}@github.com/hugozhu/hugozhu.github.com | |
git add * | |
git commit -m "Updated ${{ env.GITHUB_RUN_ID }}" . | |
git push origin | |
- uses: hugozhu/dingtalk-github-action@v1 | |
with: | |
token: ${{ secrets.DINGTALK_TOKEN }} | |
title: 'Blog updated from Github action' | |
type: text | |
content: | | |
## Blog just updated! | |
> from github action message |