Skip to content

Commit

Permalink
Skip publishing latest and snapshot for older Grails version (#840)
Browse files Browse the repository at this point in the history
  • Loading branch information
puneetbehl authored Aug 26, 2022
1 parent 3bafcd2 commit fd00716
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,18 @@ jobs:
cond: ${{ github.repository == 'grails/grails-doc' }}
if_true: 'grails/grails-doc'
if_false: ${{ github.repository }}
- name: Extract branch name
if: success()
id: extract_branch
run: echo ::set-output name=value::${GITHUB_REF:11}
- name: Publish to Github Pages
if: success()
uses: micronaut-projects/github-pages-deploy-action@master
uses: micronaut-projects/github-pages-deploy-action@grails
env:
TARGET_REPOSITORY: ${{ steps.docs_target.outputs.value }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
BRANCH: gh-pages
OLDER_VERSION: ${{ startsWith(steps.extract_branch.outputs.value, '3.3') || startsWith(steps.extract_branch.outputs.value, '4.1') }}
FOLDER: build/docs
DOC_FOLDER: gh-pages
COMMIT_EMAIL: ${{ env.GIT_USER_EMAIL }}
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ jobs:
matrix:
java: ['8']
env:
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') }}
BETA: ${{ contains(github.event.inputs.grails_version, 'M') || contains(github.event.inputs.grails_version, 'RC') }}
OLDER_VERSION: ${{ startsWith(github.event.inputs.grails_version, '3.3') || startsWith(github.event.inputs.grails_version, '4.1') }}
GIT_USER_NAME: puneetbehl
GIT_USER_EMAIL: [email protected]
steps:
Expand Down Expand Up @@ -86,7 +87,7 @@ jobs:
if_false: ${{ github.repository }}
- name: Publish to Github Pages
if: success()
uses: micronaut-projects/github-pages-deploy-action@master
uses: micronaut-projects/github-pages-deploy-action@grails
env:
TARGET_REPOSITORY: ${{ steps.docs_target.outputs.value }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
Expand Down

0 comments on commit fd00716

Please sign in to comment.