diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..774601a --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,29 @@ +name: build +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + java: [ '8' ] + architecture: [ 'x64' ] + name: Build with JDK ${{ matrix.java }} on ${{ matrix.architecture }} + steps: + - uses: actions/checkout@v4 + - name: Setup JDK + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: ${{ matrix.java }} + architecture: ${{ matrix.architecture }} + cache: 'gradle' + + - name: Build with Gradle + run: ./gradlew asciidoc diff --git a/README.adoc b/README.adoc index 997f5e7..61b2f07 100644 --- a/README.adoc +++ b/README.adoc @@ -2,14 +2,10 @@ This is the source of the http://docs.vavr.io/[Vavr documentation]. -=== Performing Updates +== Performing Updates -* Ensure `~/.gradle/gradle.properties` exists with: - - githubUser= - githubPassword= +* Ensure that `GITHUB_USER` and `GITHUB_TOKEN` variables are set in your environment. * Update the version in `gradle.properties`. Please note that the version in the Maven section of `getting_started.adoc` currently has to be updated manually. * Write documentation and test results with `./gradlew asciidoc`. If the Vavr API has changed, some code example tests might fail. * Then `git commit`, `git push` and `./gradlew publishGhPages` -* Nowadays, `githubPassword` effectively means a token and not the actual password! diff --git a/build.gradle b/build.gradle index 3ea5b89..a964763 100644 --- a/build.gradle +++ b/build.gradle @@ -94,8 +94,8 @@ githubPages { repoUri = 'https://github.com/vavr-io/vavr-docs.git' credentials { - username = project.githubUser - password = project.githubPassword + username = System.getenv('GITHUB_USER') ?: '' + password = System.getenv('GITHUB_TOKEN') ?: '' } pages {