Skip to content

Grass 二期挂机空投指南 #146

Grass 二期挂机空投指南

Grass 二期挂机空投指南 #146

Workflow file for this run

name: 部署博客
env:
# hexo源文件仓库
BLOG_SOURCE: flytam/blog-source
# issue链接
ISSUE_URL: https://github.com/flytam/blog/issues
# blog部署的页面
BLOG: flytam/blog
# ${{ github.event.issue.user.login }}
on:
issues:
types: [opened, edited]
push:
branches:
- 'master'
jobs:
build:
runs-on: ubuntu-latest
# 仓库作者才才能触发
if: ${{ github.actor == github.repository_owner }}
steps:
- name: 拉取hexo源文件
uses: actions/checkout@v3
with:
persist-credentials: 'false'
repository: ${{ env.BLOG_SOURCE }}
ref: 'main'
token: ${{ secrets.token }}
- name: issue生成 hexo文章
uses: flytam/github-issue-to-hexo@main
with:
issue_url: ${{ env.ISSUE_URL }}
output: 'source/_posts'
replace: true
- name: commit hexo源文件
run: |
echo $(date) > update.md
git add .
git config user.name "issue-to-hexo bot"
git config user.email "test@github.com"
git commit -m "Add a post"
- name: 推送hexo源文件
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.token }}
repository: ${{ env.BLOG_SOURCE }}