File tree Expand file tree Collapse file tree 2 files changed +33
-3
lines changed Expand file tree Collapse file tree 2 files changed +33
-3
lines changed Original file line number Diff line number Diff line change 11# Simple workflow for deploying static content to GitHub Pages
2- name : Deploy static content to Pages
2+ name : Test and Deploy static content to Pages
33
44on :
5- # Runs on pushes targeting the default branch
65 push :
76 branches : ["master"]
7+ pull_request :
8+ branches : ["master"]
89
910 # Allows you to run this workflow manually from the Actions tab
1011 workflow_dispatch :
@@ -22,11 +23,12 @@ concurrency:
2223 cancel-in-progress : false
2324
2425jobs :
25- # Single deploy job since we're just deploying
26+ # build and deploy pages on merges
2627 deploy :
2728 environment :
2829 name : github-pages
2930 url : ${{ steps.deployment.outputs.page_url }}
31+ if : github.event_name != 'pull_request'
3032 runs-on : ubuntu-latest
3133 steps :
3234 - name : Checkout
4749 - name : Deploy to GitHub Pages
4850 id : deployment
4951 uses : actions/deploy-pages@v4
52+ # test that docs build correctly on PRs
53+ test-deploy :
54+ if : github.event_name == 'pull_request'
55+ runs-on : ubuntu-latest
56+ steps :
57+ - uses : actions/checkout@v4
58+ - uses : actions/setup-python@v5
59+ with :
60+ python-version : 3.x
61+ - run : |
62+ pip install mkdocs-material
63+ pip install $(mkdocs-get-deps)
64+ - run : mkdocs build
65+ - name : Upload Artifact (Test)
66+ uses : actions/upload-artifact@v4
67+ with :
68+ name : test-mkdocs-site
69+ path : ./site
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ The following tasks are performed:
1414- Check out the Kubernetes source tree and compiles some dependencies
1515- Install KIND
1616- Run a matrix of End-To-End Tests using KIND
17+ - Ensure that documentation builds successfully
1718
1819The full matrix of e2e tests found [ here] ( https://github.com/ovn-org/ovn-kubernetes/blob/master/.github/workflows/test.yml )
1920are also run periodically (twice daily) using an OVN-Kubernetes build based on the currently merged code base.
@@ -379,3 +380,12 @@ defined in https://github.com/kubernetes-sigs/network-policy-api/tree/master/con
379380and then invoked from this repo. Any changes to the tests first have to be submitted
380381upstream to ` network-policy-api ` repo and then brought downstream into the ovn-kubernetes repo
381382through version bump.
383+
384+ # Documentation Build Check
385+
386+ To catch any potential documentation build breakages which would prevent any docs changes
387+ from being deployed to our GitHub Pages [ site] ( https://github.com/ovn-org/ovn-kubernetes ) . The build check will produce the
388+ html docs and will be available in the job artifacts for review. There is a link printed
389+ in the job run logs inside the step "Upload Artifact". Download and unzip that locally
390+ to view the resulting docs after they are built to see what would be deployed to github
391+ pages.
You can’t perform that action at this time.
0 commit comments