Skip to content

Merge pull request #19 from jakartaee/feature/78_refresh_intro_and_pr… #72

Merge pull request #19 from jakartaee/feature/78_refresh_intro_and_pr…

Merge pull request #19 from jakartaee/feature/78_refresh_intro_and_pr… #72

name: build
on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- id: checkout
name: Checkout
uses: actions/checkout@v3
- id: setup-jdk
name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
cache: maven
- id: setup-ruby
name: Set up Ruby 3.0
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
- id: install-asciidoctor-pdf
name: Install asciidoctor-pdf
run: gem install asciidoctor-pdf
- id: build-docs
name: Build Docs
run: mvn -B clean package
- id: create-gh-pages-artifact
name: Create GitHub Pages Artifact
if: github.event_name == 'workflow_dispatch' || github.event_name == 'push'
uses: actions/upload-pages-artifact@v1
with:
path: target/generated-docs
deploy:
name: Deploy to GitHub Pages
if: github.event_name == 'workflow_dispatch' || github.event_name == 'push'
runs-on: ubuntu-latest
needs: build
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
name: Deploy to GitHub Pages
uses: actions/deploy-pages@v2