File tree Expand file tree Collapse file tree 3 files changed +69
-1
lines changed
Expand file tree Collapse file tree 3 files changed +69
-1
lines changed Original file line number Diff line number Diff line change 1+ name : pr
2+
3+ on :
4+ pull_request :
5+
6+ permissions :
7+ contents : write
8+ issues : write
9+ pull-requests : write
10+ jobs :
11+ pre-commit-and-deploy :
12+ runs-on : ubuntu-latest
13+ steps :
14+ - uses : actions/checkout@v3
15+ with :
16+ fetch-depth : 0
17+ - uses : actions/setup-python@v6
18+ with :
19+ python-version : 3.12
20+ cache : ' pip'
21+ - name : pre-commit
22+ uses : pre-commit/action@v3.0.1
23+ with :
24+ extra_args : " --from-ref origin/main --to-ref HEAD"
25+ - name : Install Dependencies
26+ run : |
27+ pip install -r requirements.txt
28+ - name : Setup Docs Deploy
29+ run : |
30+ git config --global user.name "Docs Deploy"
31+ git config --global user.email "docs.deploy@example.co.uk"
32+ - name : Build Docs Website
33+ run : mike deploy --update-aliases --push pr-${{ github.event.pull_request.number }}
34+ - uses : mshick/add-pr-comment@v2
35+ with :
36+ message : |
37+ Thanks, please check
38+ https://rbo.github.io/openshift-examples-web/preview/pr-${{ github.event.pull_request.number }}/
39+ before merge.
Original file line number Diff line number Diff line change 1+ name : pr-close
2+
3+ on :
4+ pull_request :
5+ types :
6+ - closed
7+
8+ permissions :
9+ contents : write
10+
11+ jobs :
12+ cleanup :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - uses : actions/checkout@v3
16+ with :
17+ fetch-depth : 0
18+ - uses : actions/setup-python@v6
19+ with :
20+ python-version : 3.12
21+ cache : ' pip'
22+ - name : Install Dependencies
23+ run : |
24+ pip install -r requirements.txt
25+ - name : Setup Docs Deploy
26+ run : |
27+ git config --global user.name "Docs Deploy"
28+ git config --global user.email "docs.deploy@example.co.uk"
29+ - name : Build Docs Website
30+ run : mike delete --push pr-${{ github.event.pull_request.number }}
Original file line number Diff line number Diff line change 1212 steps :
1313 - uses : actions/checkout@v3
1414 with :
15- submodules : ' true'
1615 fetch-depth : 0
1716 - uses : actions/setup-python@v6
1817 with :
You can’t perform that action at this time.
0 commit comments