Skip to content

Commit

Permalink
Define basic GitHub Actions build
Browse files Browse the repository at this point in the history
  • Loading branch information
pivovarit committed Dec 5, 2024
1 parent 898f024 commit 0ac5157
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 8 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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
8 changes: 2 additions & 6 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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=<GitHub user>
githubPassword=<GitHub password>
* 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!
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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') ?: 'defaultUser'
password = System.getenv('GITHUB_TOKEN') ?: 'defaultToken'
}

pages {
Expand Down

0 comments on commit 0ac5157

Please sign in to comment.