Skip to content

Commit

Permalink
revert(ci): switch back ti a three-phase build-and-deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
DanySK authored Jan 24, 2022
1 parent 683c92b commit 33fd07e
Showing 1 changed file with 50 additions and 16 deletions.
66 changes: 50 additions & 16 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,29 +49,13 @@ jobs:
with:
build-command: |
./gradlew assemble shadowJar --parallel || ./gradlew assemble shadowJar --parallel
if [ '${{ matrix.os }}' == 'ubuntu' ]; then
./gradlew hugoBuild --parallel
fi
check-command: |
./gradlew check --parallel || ./gradlew check --parallel
if [ '${{ matrix.os }}' == 'ubuntu' ]; then
# Temporarily disable checks on kdoc/javadoc: too many bugs in Dokka.
# See:
# https://github.com/Kotlin/dokka/issues/2320
# https://github.com/Kotlin/dokka/issues/2321
# https://github.com/Kotlin/dokka/issues/2322
# https://github.com/Kotlin/dokka/issues/2323
# Once everything gets fixed, lychee could simply run on '/lychee/**/*.html'
FILES="$(find build/website/ -name '*.html' | grep -v /kdoc/ | grep -v /javadoc/ | sed -e 's#^build##')"
docker run --rm -v "$(pwd)/build/website:/website" -e GITHUB_TOKEN lycheeverse/lychee $(echo "$FILES") --exclude-file /website/lycheeignore -m 100 --threads 1
fi
clean-command: |
./gradlew clean --parallel
deploy-command: |
./gradlew signKotlinMavenPublication --parallel
./gradlew closeKotlinMavenOnMavenCentralNexus
npm install
npx semantic-release
should-run-codecov: ${{ contains('Linux', runner.os) }}
should-deploy: >-
${{
Expand All @@ -83,3 +67,53 @@ jobs:
maven-central-password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
signing-key: ${{ secrets.SIGNING_KEY }}
signing-password: ${{ secrets.SIGNING_PASSWORD }}
build-website:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: danysk/[email protected]
- uses: DanySK/[email protected]
with:
build-command: ./gradlew hugoBuild --parallel
check-command: |
# Temporarily disable checks on kdoc/javadoc: too many bugs in Dokka.
# See:
# https://github.com/Kotlin/dokka/issues/2320
# https://github.com/Kotlin/dokka/issues/2321
# https://github.com/Kotlin/dokka/issues/2322
# https://github.com/Kotlin/dokka/issues/2323
# Once everything gets fixed, lychee could simply run on '/lychee/**/*.html'
FILES="$(find build/website/ -name '*.html' | grep -v /kdoc/ | grep -v /javadoc/ | sed -e 's#^build##')"
docker run --rm -v "$(pwd)/build/website:/website" -e GITHUB_TOKEN lycheeverse/lychee $(echo "$FILES") --exclude-file /website/lycheeignore -m 100 --threads 1
should-run-codecov: false
should-deploy: false
github-token: ${{ secrets.DEPLOYMENT_TOKEN }}
Release:
needs:
- build
- build-website
runs-on: ubuntu-latest
if: >-
contains('push workflow_dispatch', github.event_name)
&& contains(github.repository, 'AlchemistSimulator/Alchemist')
steps:
- name: Checkout
uses: actions/[email protected]
with:
token: ${{ secrets.DEPLOYMENT_TOKEN }}
- uses: DanySK/[email protected]
with:
java-version: 11
build-command: true
check-command: true
deploy-command: |
npm install
npx semantic-release
should-run-codecov: false
should-deploy: true
should-validate-wrapper: false
github-token: ${{ secrets.DEPLOYMENT_TOKEN }}
maven-central-password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
signing-key: ${{ secrets.SIGNING_KEY }}
signing-password: ${{ secrets.SIGNING_PASSWORD }}

0 comments on commit 33fd07e

Please sign in to comment.