Skip to content

Commit

Permalink
Create Workflow to Publish Docs (#415)
Browse files Browse the repository at this point in the history
  • Loading branch information
puneetbehl authored Jan 16, 2024
1 parent 59a2e77 commit 2cc8192
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Publish Docs
on:
workflow_dispatch:
inputs:
version:
description: 'Version to publish'
required: true
jobs:
docs:
needs: publish
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '11'
- name: Checkout repository
uses: actions/checkout@v3
with:
token: ${{ secrets.GH_TOKEN }}
ref: v${{ github.event.inputs.version }}
- name: Publish Documentation
id: docs
uses: gradle/gradle-build-action@v2
with:
arguments: docs
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }}
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }}
- name: Publish to Github Pages
if: success()
uses: micronaut-projects/github-pages-deploy-action@grails
env:
BETA: ${{ contains(needs.publish.outputs.release_version, 'M') }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
BRANCH: gh-pages
FOLDER: build/docs
VERSION: ${{ needs.publish.outputs.release_version }}
COMMIT_EMAIL: ${{ env.GIT_USER_EMAIL }}
COMMIT_NAME: ${{ env.GIT_USER_NAME }}

0 comments on commit 2cc8192

Please sign in to comment.