-
Notifications
You must be signed in to change notification settings - Fork 607
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2819 from armanbilge/topic/sbt-typelevel-site
Use sbt-typelevel-site plugin to build/publish microsite
- Loading branch information
Showing
4 changed files
with
44 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,16 +85,13 @@ jobs: | |
cd scalafix | ||
sbt testCI | ||
- if: matrix.scala == '2.13.8' && matrix.project == 'rootJVM' | ||
run: sbt 'project ${{ matrix.project }}' '++${{ matrix.scala }}' microsite/mdoc | ||
|
||
- name: Make target directories | ||
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/series/2.5.x') | ||
run: mkdir -p target node/js/target protocols/js/target .js/target core/js/target core/jvm/target .jvm/target .native/target scodec/jvm/target scodec/js/target io/js/target reactive-streams/target io/jvm/target protocols/jvm/target benchmark/target project/target | ||
run: mkdir -p target node/js/target protocols/js/target .js/target core/js/target mdoc/target core/jvm/target .jvm/target .native/target scodec/jvm/target scodec/js/target io/js/target reactive-streams/target io/jvm/target protocols/jvm/target benchmark/target project/target | ||
|
||
- name: Compress target directories | ||
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/series/2.5.x') | ||
run: tar cf targets.tar target node/js/target protocols/js/target .js/target core/js/target core/jvm/target .jvm/target .native/target scodec/jvm/target scodec/js/target io/js/target reactive-streams/target io/jvm/target protocols/jvm/target benchmark/target project/target | ||
run: tar cf targets.tar target node/js/target protocols/js/target .js/target core/js/target mdoc/target core/jvm/target .jvm/target .native/target scodec/jvm/target scodec/js/target io/js/target reactive-streams/target io/jvm/target protocols/jvm/target benchmark/target project/target | ||
|
||
- name: Upload target directories | ||
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/series/2.5.x') | ||
|
@@ -213,78 +210,45 @@ jobs: | |
run: sbt '++${{ matrix.scala }}' tlRelease | ||
|
||
site: | ||
name: Deploy site | ||
needs: [publish] | ||
if: always() && needs.build.result == 'success' && (needs.publish.result == 'success' && github.ref == 'refs/heads/main') | ||
name: Generate Site | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
scala: [2.13.8] | ||
java: [temurin@17] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Download target directories (3.1.1, rootJS) | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: target-${{ matrix.os }}-${{ matrix.java }}-3.1.1-rootJS | ||
|
||
- name: Inflate target directories (3.1.1, rootJS) | ||
run: | | ||
tar xf targets.tar | ||
rm targets.tar | ||
- name: Download target directories (3.1.1, rootJVM) | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: target-${{ matrix.os }}-${{ matrix.java }}-3.1.1-rootJVM | ||
|
||
- name: Inflate target directories (3.1.1, rootJVM) | ||
run: | | ||
tar xf targets.tar | ||
rm targets.tar | ||
- name: Download target directories (2.12.15, rootJS) | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12.15-rootJS | ||
|
||
- name: Inflate target directories (2.12.15, rootJS) | ||
run: | | ||
tar xf targets.tar | ||
rm targets.tar | ||
- name: Download target directories (2.12.15, rootJVM) | ||
uses: actions/download-artifact@v2 | ||
- name: Checkout current branch (full) | ||
uses: actions/checkout@v2 | ||
with: | ||
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12.15-rootJVM | ||
|
||
- name: Inflate target directories (2.12.15, rootJVM) | ||
run: | | ||
tar xf targets.tar | ||
rm targets.tar | ||
fetch-depth: 0 | ||
|
||
- name: Download target directories (2.13.8, rootJS) | ||
uses: actions/download-artifact@v2 | ||
- name: Setup Java (temurin@17) | ||
if: matrix.java == 'temurin@17' | ||
uses: actions/setup-java@v2 | ||
with: | ||
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13.8-rootJS | ||
|
||
- name: Inflate target directories (2.13.8, rootJS) | ||
run: | | ||
tar xf targets.tar | ||
rm targets.tar | ||
distribution: temurin | ||
java-version: 17 | ||
|
||
- name: Download target directories (2.13.8, rootJVM) | ||
uses: actions/download-artifact@v2 | ||
- name: Cache sbt | ||
uses: actions/cache@v2 | ||
with: | ||
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13.8-rootJVM | ||
path: | | ||
~/.sbt | ||
~/.ivy2/cache | ||
~/.coursier/cache/v1 | ||
~/.cache/coursier/v1 | ||
~/AppData/Local/Coursier/Cache/v1 | ||
~/Library/Caches/Coursier/v1 | ||
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} | ||
|
||
- name: Inflate target directories (2.13.8, rootJVM) | ||
run: | | ||
tar xf targets.tar | ||
rm targets.tar | ||
- name: Generate site | ||
run: sbt '++${{ matrix.scala }}' microsite/tlSite | ||
|
||
- name: Deploy site | ||
uses: peaceiris/actions-gh-pages@v3 | ||
- name: Publish site | ||
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' | ||
uses: peaceiris/[email protected] | ||
with: | ||
publish_dir: ./target/website | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: mdoc/target/docs/site | ||
keep_files: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters