Skip to content

Commit

Permalink
Deploy docs to github pages (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
fwilhe authored May 7, 2024
1 parent 2abbd95 commit ffe42cc
Showing 1 changed file with 44 additions and 1 deletion.
45 changes: 44 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@ on:
branches: [ "main" ]
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:

Expand All @@ -28,7 +40,13 @@ jobs:
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0

- name: Build with Gradle Wrapper
run: ./gradlew build
run: ./gradlew build asciidoctor

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: 'build'

dependency-submission:

Expand All @@ -48,3 +66,28 @@ jobs:
# See: https://github.com/gradle/actions/blob/main/dependency-submission/README.md
- name: Generate and submit dependency graph
uses: gradle/actions/dependency-submission@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0

deploy-pages:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs:
- build
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v5
- uses: actions/download-artifact@v4
with:
name: build-artifacts
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'docs/asciidoc'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit ffe42cc

Please sign in to comment.