Skip to content

Commit 872c536

Browse files
committed
Define basic GitHub Actions build
1 parent 898f024 commit 872c536

File tree

2 files changed

+33
-2
lines changed

2 files changed

+33
-2
lines changed

.github/workflows/build.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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
30+
env:
31+
GITHUB_USER: 'foo'

build.gradle

Lines changed: 2 additions & 2 deletions
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') ?: 'defaultUser'
98+
password = System.getenv('GITHUB_TOKEN') ?: 'defaultToken'
9999
}
100100

101101
pages {

0 commit comments

Comments
 (0)