Skip to content

Commit

Permalink
🔨 CI: switch to Actions-based Pages deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
berlix committed Sep 5, 2023
1 parent 34ce4b8 commit 648865d
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,19 @@ on:
push:
tags:
- '*.*.*'
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "release"
cancel-in-progress: false
jobs:
publish:
runs-on: ubuntu-22.04
steps:
- name: Check out
uses: actions/checkout@v3
with:
ref: main
fetch-depth: 0

- name: Set up JDK 11
uses: actions/setup-java@v3
Expand All @@ -34,19 +38,19 @@ jobs:
OSSRH_GPG_KEY: ${{ secrets.OSSRH_GPG_KEY }}
OSSRH_GPG_PASSWORD: ${{ secrets.OSSRH_GPG_PASSWORD }}

- name: Publish docs
- name: Build docs
run: |
./gradlew dokkaHtmlMultiModule --info --stacktrace
git checkout gh-pages
mkdir -p apidocs
cp -r build/dokka/htmlMultiModule apidocs/$VERSION
rm -f apidocs/latest
ln -s $VERSION apidocs/latest
git config user.email "[email protected]"
git config user.name "Automation"
git add apidocs/$VERSION apidocs/latest
git commit -m "Add docs for $VERSION"
git push
mkdir -p ./build/pages/apidocs
cp -r ./build/dokka/htmlMultiModule ./build/pages/apidocs/latest
- name: Set up GitHub Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./build/pages
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v2

- name: Upload reports
uses: actions/upload-artifact@v3
Expand Down

0 comments on commit 648865d

Please sign in to comment.