name: Issue to Hexo on: issues: # Sufficient to trigger this workflow when an issue is milestoned types: [ milestoned ] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 with: persist-credentials: 'false' - uses: actions/setup-node@v3 with: node-version: 16 - uses: zcong1993/setup-timezone@master with: timezone: Asia/Shanghai - uses: gsongsong/issue-to-hexo@v1.0.0 with: issue_url: ${{ github.event.issue.url }} # Personal access token used to get information of Issue token: ${{ secrets.token }} # At this point, a markdown file is generated and untracked # Take further action, e.g. generate (`hexo generate`), commit and push - name: Commit post run: | git add . git config user.name "issue-to-hexo bot" git config user.email "<>" git commit -m "Add a post" - name: Push uses: ad-m/github-push-action@master with: github_token: ${{ secrets.token }}