Skip to content

7. GitHub Actions - 在pull request中执行eslint检测的工作流例子 #10

7. GitHub Actions - 在pull request中执行eslint检测的工作流例子

7. GitHub Actions - 在pull request中执行eslint检测的工作流例子 #10

Workflow file for this run

name: Issue to Hexo
on:
issues:
types: [ milestoned ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
# - name: work branch
# run: |
# git checkout -b feat/issue-to-hexo-$(date '+%Y%m%d%H%I%S')
- name: init pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: init node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
cache-dependency-path: 'src'
# - name: cd hexo
# run: cd src
- name: install dependencies
run: |
ls -a
pnpm install
- name: generate issue to hexo
uses: somidad/[email protected]
with:
issue_url: ${{ github.event.issue.url }}
token: ${{ github.token }}
- name: generate hexo
run: |
cd ..
pnpm run build
- name: create Pull Request
uses: peter-evans/create-pull-request@v5
with:
title: New blog by Action
base: master
branch: feat/new-blog-by-action