mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-05 07:26:55 +08:00
feat: deploy docs to github pages when PR merged
This commit is contained in:
@@ -1,19 +1,25 @@
|
|||||||
name: Deploy docs to GitHub Pages
|
name: Deploy docs to GitHub Pages
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
pull_request:
|
||||||
branches:
|
branches: [main]
|
||||||
- main
|
types: [closed]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
name: Deploy docs to GitHub Pages
|
name: Deploy docs to GitHub Pages
|
||||||
|
if: ${{ github.event.pull_request.merged }} # true
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: Checkout code
|
||||||
- uses: actions/setup-python@v2
|
uses: actions/checkout@v2
|
||||||
|
- name: Setup python3 env
|
||||||
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: 3.x
|
python-version: 3.x
|
||||||
- run: pip install mkdocs-material # including mkdocs
|
- name: Install mkdocs and material design
|
||||||
- run: go test docs/cmd/doc_test.go # update hrp cli docs
|
run: pip install mkdocs-material # including mkdocs
|
||||||
- run: mkdocs gh-deploy --force
|
- name: Update hrp cli docs
|
||||||
|
run: go test docs/cmd/doc_test.go # update hrp cli docs
|
||||||
|
- name: Deploy docs to github pages
|
||||||
|
run: mkdocs gh-deploy --force
|
||||||
|
|||||||
Reference in New Issue
Block a user