From 38c68da203a6abd72909c7104c34a1b5435f1e33 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Tue, 4 Apr 2023 09:36:50 -0700 Subject: [PATCH] Added pages GitHub workflow --- .github/workflows/pages.yml | 57 +++++++++++++++++++ README.md | 2 +- .../propertyfile/PropertyFileBuild.java | 16 ++++-- 3 files changed, 69 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/pages.yml diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 0000000..f6122cd --- /dev/null +++ b/.github/workflows/pages.yml @@ -0,0 +1,57 @@ +name: javadocs-pages + +on: + # Runs on pushes targeting the default branch + push: + branches: ["master"] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow one concurrent deployment +concurrency: + group: "pages" + cancel-in-progress: true + +jobs: + # Single deploy job since we're just deploying + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + runs-on: ubuntu-latest + + steps: + - name: Checkout source repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + distribution: 'zulu' + java-version: 17 + + - name: Build Javadocs + run: ./bld download clean javadoc + + - name: Setup Pages + uses: actions/configure-pages@v3 + + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + with: + # Upload generated Javadocs repository + path: 'build/javadoc/' + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v1 \ No newline at end of file diff --git a/README.md b/README.md index 277bf16..bdc6e2a 100755 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Java](https://img.shields.io/badge/java-17%2B-blue)](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html) [![GitHub CI](https://github.com/rife2/bld-property-file/actions/workflows/bld.yml/badge.svg)](https://github.com/rife2/bld-property-file/actions/workflows/bld.yml) -An extension for creating or modifying [property files](https://docs.oracle.com/javase/tutorial/essential/environment/properties.html) with [bld](https://github.com/rife2/rife2/wiki/What-Is-Bld). It is inspired by the [ant PropertyFile task](https://ant.apache.org/manual/Tasks/propertyfile.html). +A `bld` extension for creating or modifying [property files](https://docs.oracle.com/javase/tutorial/essential/environment/properties.html) with [bld](https://github.com/rife2/rife2/wiki/What-Is-Bld). It is inspired by the [ant PropertyFile task](https://ant.apache.org/manual/Tasks/propertyfile.html). ```java @BuildCommand diff --git a/src/bld/java/rife/bld/extension/propertyfile/PropertyFileBuild.java b/src/bld/java/rife/bld/extension/propertyfile/PropertyFileBuild.java index bca5131..f246c45 100644 --- a/src/bld/java/rife/bld/extension/propertyfile/PropertyFileBuild.java +++ b/src/bld/java/rife/bld/extension/propertyfile/PropertyFileBuild.java @@ -11,16 +11,21 @@ import java.util.List; import static rife.bld.dependencies.Repository.*; import static rife.bld.dependencies.Scope.compile; import static rife.bld.dependencies.Scope.test; +import static rife.bld.operations.JavadocOptions.DocLinkOption.NO_MISSING; public class PropertyFileBuild extends Project { public PropertyFileBuild() { pkg = "rife.bld.extension"; name = "bld-property-file"; version = version(0, 9, 0); - javadocOptions.add("-Xdoclint:-missing"); + javadocOptions + .docLint(NO_MISSING) + .link("https://rife2.github.io/rife2/"); publishRepository = MAVEN_LOCAL; - publishInfo = new PublishInfo().groupId("com.uwyn.rife2").artifactId("bld-property-file") - .description("Bld Extension to Create or Modify Properties Files") + publishInfo = new PublishInfo() + .groupId("com.uwyn.rife2") + .artifactId("bld-property-file") + .description("bld Extension to Create or Modify Properties Files") .url("https://github.com/rife2/bld-property-file") .developer(new PublishDeveloper().id("ethauvin").name("Erik C. Thauvin").email("erik@thauvin.net") .url("https://erik.thauvin.net/")) @@ -33,9 +38,10 @@ public class PropertyFileBuild extends Project { .url("https://github.com/rife2/bld-property-file")); javaRelease = 17; - downloadSources = true; - repositories = List.of(MAVEN_CENTRAL, SONATYPE_SNAPSHOTS); + autoDownloadPurge = true; + repositories = List.of(MAVEN_CENTRAL, RIFE2); + scope(compile) .include(dependency("com.uwyn.rife2", "rife2", version(1, 5, 15))); scope(test)