Skip to content

Commit

Permalink
Custom deployments for branches
Browse files Browse the repository at this point in the history
  • Loading branch information
duncte123 committed Dec 17, 2023
1 parent 0e7e291 commit fc49f93
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/docs-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Docs Branch

on:
push:
branches: [ '**' ]
paths:
- 'dokka/**'
- 'src/main/**'
- '.github/workflows/docs-branch.yml'

concurrency:
group: pages-${{ github.ref_name }}
cancel-in-progress: true

jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
java-version: 17
distribution: zulu
cache: gradle
- name: Build docs
run: ./gradlew --no-daemon dokkaHtml dokkaJavadoc
- name: Copy javadoc subfolder
run: mv build/dokka/javadoc build/dokka/html/
- uses: actions/upload-pages-artifact@v1
with:
path: 'build/dokka/html'
- uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: ${{ vars.CLOUDFLARE_PROJECT_NAME }}
directory: build/dokka/html
branch: ${{ github.ref_name }}
gitHubToken: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit fc49f93

Please sign in to comment.