mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-12 02:21:29 +08:00
feat: deploy docs to github pages when PR merged
This commit is contained in:
22
.github/workflows/deploy-mkdocs.yml
vendored
22
.github/workflows/deploy-mkdocs.yml
vendored
@@ -1,19 +1,25 @@
|
||||
name: Deploy docs to GitHub Pages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches: [main]
|
||||
types: [closed]
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
name: Deploy docs to GitHub Pages
|
||||
if: ${{ github.event.pull_request.merged }} # true
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-python@v2
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Setup python3 env
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.x
|
||||
- run: pip install mkdocs-material # including mkdocs
|
||||
- run: go test docs/cmd/doc_test.go # update hrp cli docs
|
||||
- run: mkdocs gh-deploy --force
|
||||
- name: Install mkdocs and material design
|
||||
run: pip install mkdocs-material # including mkdocs
|
||||
- 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