-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(website): switch from orchid to hugo (#1049)
* Orchid seems to be facing issues with maintenance. The [last update](https://orchid.run/news/2021-5-13/whats-up-with-orchid) was on May 2021, and the deadlines there have not been met. Most notably, there is still no support for recent Java, nor a release on Central (orchidhq/Orchid#393). Hugo, although less integrated with Gradle, seems way more solid. I mourn the possibility to write templates in Pebble + Kotlin, the language for Hugo shortcodes is not even closely comparable. * The CI now checks for dangling links, except in Dokka-generated documents, as they are **WAY** too buggy, see Kotlin/dokka#2320, Kotlin/dokka#2321, Kotlin/dokka#2322, and Kotlin/dokka#2323, that I opened before giving up on checking link integrity. * The update comes with some internal refactoring to the classes defining the YAML syntax elements.
- Loading branch information
Showing
181 changed files
with
4,033 additions
and
5,050 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 |
---|---|---|
|
@@ -27,73 +27,58 @@ jobs: | |
steps: | ||
- name: Checkout | ||
uses: danysk/[email protected] | ||
- name: Checkout the docs | ||
if: contains(github.repository, 'AlchemistSimulator/Alchemist') | ||
uses: actions/[email protected] | ||
with: | ||
path: build/website | ||
fetch-depth: 0 | ||
persist-credentials: true | ||
repository: AlchemistSimulator/alchemistsimulator.github.io | ||
submodules: recursive | ||
token: ${{ secrets.DEPLOYMENT_TOKEN }} | ||
- name: Cleanup the old website | ||
shell: bash | ||
run: | | ||
rm -rf build/website/* | ||
ls -ahl build/website | ||
- name: Get branch name | ||
id: branch | ||
uses: tj-actions/branch-names@v5 | ||
- uses: DanySK/[email protected] | ||
with: | ||
build-command: | | ||
./gradlew assemble shadowJar --parallel | ||
./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: >- | ||
${{ | ||
contains('Linux', runner.os) | ||
&& contains(github.repository, 'AlchemistSimulator/Alchemist') | ||
&& contains('push workflow_dispatch', github.event_name) | ||
}} | ||
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: | ||
java-version: 11 | ||
build-command: ./gradlew orchidBuild --parallel | ||
check-command: true | ||
should-run-codecov: false | ||
should-deploy: >- | ||
${{ | ||
contains(github.repository, 'AlchemistSimulator/Alchemist') | ||
&& contains('push workflow_dispatch', github.event_name) | ||
}} | ||
deploy-command: ./gradlew orchidDeploy --parallel | ||
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 }} | ||
|
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "src/main/hugo/themes/hugo-theme-relearn"] | ||
path = src/main/hugo/themes/hugo-theme-relearn | ||
url = [email protected]:McShelby/hugo-theme-relearn.git |
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
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
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
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
27 changes: 27 additions & 0 deletions
27
alchemist-loading/src/main/kotlin/it/unibo/alchemist/loader/m2m/syntax/DescriptorBuilder.kt
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Copyright (C) 2010-2022, Danilo Pianini and contributors | ||
* listed, for each module, in the respective subproject's build.gradle.kts file. | ||
* | ||
* This file is part of Alchemist, and is distributed under the terms of the | ||
* GNU General Public License, with a linking exception, | ||
* as described in the file LICENSE in the Alchemist distribution's top directory. | ||
*/ | ||
|
||
package it.unibo.alchemist.loader.m2m.syntax | ||
|
||
@Suppress("SuspiciousCollectionReassignment") | ||
internal class DescriptorBuilder { | ||
private var forbiddenKeys = emptySet<String>() | ||
private var mandatoryKeys = emptySet<String>() | ||
private var optionalKeys = emptySet<String>() | ||
fun forbidden(vararg names: String) { | ||
forbiddenKeys += names.toSet() | ||
} | ||
fun mandatory(vararg names: String) { | ||
mandatoryKeys += names.toSet() | ||
} | ||
fun optional(vararg names: String) { | ||
optionalKeys += names.toSet() | ||
} | ||
fun build() = SyntaxElement.ValidDescriptor(mandatoryKeys, optionalKeys, forbiddenKeys) | ||
} |
Oops, something went wrong.