Skip to content

Commit 2643574

Browse files
Revathyvenugopal162pyansys-ci-botSMoraisAnsys
authored
ci: add pull request preview action (#813)
Co-authored-by: pyansys-ci-bot <[email protected]> Co-authored-by: Sébastien Morais <[email protected]>
1 parent 9ea720b commit 2643574

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

.github/workflows/ci_cd.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: CI
33
on:
44
workflow_dispatch:
55
pull_request:
6+
types: [opened, reopened, synchronize, edited, closed]
67
push:
78
tags:
89
- "*"
@@ -114,6 +115,21 @@ jobs:
114115
requires-xvfb: true
115116
dependencies: 'pandoc'
116117

118+
doc-deploy-pr:
119+
name: "Deploy PR documentation"
120+
runs-on: ubuntu-latest
121+
needs: [doc-build]
122+
# Run when the PR is closed i.e. when docs job is skipped
123+
if: github.event.action != 'closed' && (needs.doc-build.result == 'success' || needs.doc-build.result == 'skipped')
124+
steps:
125+
- uses: ansys/actions/doc-deploy-pr@c2fa7c93f6883114e0e643599431b33d29f0b13f # v10.1.4
126+
with:
127+
cname: ${{ env.DOCUMENTATION_CNAME }}
128+
token: ${{ secrets.GITHUB_TOKEN }}
129+
bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
130+
bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }}
131+
maximum-pr-doc-deployments: 20
132+
117133
doc-deploy-development:
118134
name: Doc dev version deploy
119135
if: ${{ github.ref == 'refs/heads/main' }}

doc/changelog.d/813.maintenance.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add pull request preview action

0 commit comments

Comments
 (0)