Skip to content

Commit fd00716

Browse files
authored
Skip publishing latest and snapshot for older Grails version (#840)
1 parent 3bafcd2 commit fd00716

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

.github/workflows/gradle.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,18 @@ jobs:
3535
cond: ${{ github.repository == 'grails/grails-doc' }}
3636
if_true: 'grails/grails-doc'
3737
if_false: ${{ github.repository }}
38+
- name: Extract branch name
39+
if: success()
40+
id: extract_branch
41+
run: echo ::set-output name=value::${GITHUB_REF:11}
3842
- name: Publish to Github Pages
3943
if: success()
40-
uses: micronaut-projects/github-pages-deploy-action@master
44+
uses: micronaut-projects/github-pages-deploy-action@grails
4145
env:
4246
TARGET_REPOSITORY: ${{ steps.docs_target.outputs.value }}
4347
GH_TOKEN: ${{ secrets.GH_TOKEN }}
4448
BRANCH: gh-pages
49+
OLDER_VERSION: ${{ startsWith(steps.extract_branch.outputs.value, '3.3') || startsWith(steps.extract_branch.outputs.value, '4.1') }}
4550
FOLDER: build/docs
4651
DOC_FOLDER: gh-pages
4752
COMMIT_EMAIL: ${{ env.GIT_USER_EMAIL }}

.github/workflows/release.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ jobs:
1212
matrix:
1313
java: ['8']
1414
env:
15-
BETA: ${{ startsWith(github.event.inputs.grails_version, '3.3') || startsWith(github.event.inputs.grails_version, '4.1.') || contains(github.event.inputs.grails_version, 'M') || contains(github.event.inputs.grails_version, 'RC') }}
15+
BETA: ${{ contains(github.event.inputs.grails_version, 'M') || contains(github.event.inputs.grails_version, 'RC') }}
16+
OLDER_VERSION: ${{ startsWith(github.event.inputs.grails_version, '3.3') || startsWith(github.event.inputs.grails_version, '4.1') }}
1617
GIT_USER_NAME: puneetbehl
1718
GIT_USER_EMAIL: behlp@objectcomputing.com
1819
steps:
@@ -86,7 +87,7 @@ jobs:
8687
if_false: ${{ github.repository }}
8788
- name: Publish to Github Pages
8889
if: success()
89-
uses: micronaut-projects/github-pages-deploy-action@master
90+
uses: micronaut-projects/github-pages-deploy-action@grails
9091
env:
9192
TARGET_REPOSITORY: ${{ steps.docs_target.outputs.value }}
9293
GH_TOKEN: ${{ secrets.GH_TOKEN }}

0 commit comments

Comments
 (0)