Skip to content

Commit 73b7d8d

Browse files
authored
Define basic GitHub Actions build (#56)
1 parent 898f024 commit 73b7d8d

File tree

3 files changed

+33
-8
lines changed

3 files changed

+33
-8
lines changed

.github/workflows/build.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: build
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
java: [ '8' ]
16+
architecture: [ 'x64' ]
17+
name: Build with JDK ${{ matrix.java }} on ${{ matrix.architecture }}
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Setup JDK
21+
uses: actions/setup-java@v4
22+
with:
23+
distribution: 'temurin'
24+
java-version: ${{ matrix.java }}
25+
architecture: ${{ matrix.architecture }}
26+
cache: 'gradle'
27+
28+
- name: Build with Gradle
29+
run: ./gradlew asciidoc

README.adoc

+2-6
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,10 @@
22

33
This is the source of the http://docs.vavr.io/[Vavr documentation].
44

5-
=== Performing Updates
5+
== Performing Updates
66

7-
* Ensure `~/.gradle/gradle.properties` exists with:
8-
9-
githubUser=<GitHub user>
10-
githubPassword=<GitHub password>
7+
* Ensure that `GITHUB_USER` and `GITHUB_TOKEN` variables are set in your environment.
118

129
* 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.
1310
* Write documentation and test results with `./gradlew asciidoc`. If the Vavr API has changed, some code example tests might fail.
1411
* Then `git commit`, `git push` and `./gradlew publishGhPages`
15-
* Nowadays, `githubPassword` effectively means a token and not the actual password!

build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ githubPages {
9494
repoUri = 'https://github.com/vavr-io/vavr-docs.git'
9595

9696
credentials {
97-
username = project.githubUser
98-
password = project.githubPassword
97+
username = System.getenv('GITHUB_USER') ?: ''
98+
password = System.getenv('GITHUB_TOKEN') ?: ''
9999
}
100100

101101
pages {

0 commit comments

Comments
 (0)