1+ name : Publish Docs
2+ on :
3+ workflow_dispatch :
4+ inputs :
5+ release_version :
6+ description : ' The Release Version'
7+ required : true
8+ jobs :
9+ docs :
10+ runs-on : ubuntu-latest
11+ strategy :
12+ matrix :
13+ java : ['11']
14+ env :
15+ GIT_USER_NAME : puneetbehl
16+ GIT_USER_EMAIL : behlp@objectcomputing.com
17+ steps :
18+ - name : Checkout repository
19+ uses : actions/checkout@v3
20+ ref : v${{github.event.inputs.release_version}}
21+ with :
22+ token : ${{ secrets.GH_TOKEN }}
23+ - uses : gradle/wrapper-validation-action@v1
24+ - name : Set up JDK
25+ uses : actions/setup-java@v3
26+ with :
27+ distribution : ' adopt'
28+ java-version : ${{ matrix.java }}
29+ - name : Publish Documentation
30+ id : docs
31+ if : steps.publish.outcome == 'success'
32+ uses : gradle/gradle-build-action@v2
33+ env :
34+ GRADLE_ENTERPRISE_ACCESS_KEY : ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
35+ GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER : ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }}
36+ GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY : ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }}
37+ with :
38+ arguments : docs:docs
39+ - name : Determine docs target repository
40+ if : success()
41+ uses : haya14busa/action-cond@v1
42+ id : docs_target
43+ with :
44+ cond : ${{ github.repository == 'grails/gorm-hibernate5' }}
45+ if_true : " grails/grails-data-mapping"
46+ if_false : ${{ github.repository }}
47+ - name : Publish to Github Pages
48+ if : success()
49+ uses : micronaut-projects/github-pages-deploy-action@master
50+ env :
51+ BETA : ${{ contains(steps.release_version.outputs.release_version, 'M') || contains(steps.release_version.outputs.release_version, 'RC') }}
52+ TARGET_REPOSITORY : ${{ steps.docs_target.outputs.value }}
53+ GH_TOKEN : ${{ secrets.GH_TOKEN }}
54+ BRANCH : gh-pages
55+ FOLDER : docs/build/docs
56+ DOC_SUB_FOLDER : hibernate
57+ DOC_FOLDER : gh-pages
58+ COMMIT_EMAIL : behlp@objectcomputing.com
59+ COMMIT_NAME : Puneet Behl
60+ VERSION : ${{ steps.release_version.outputs.release_version }}
0 commit comments