Skip to content

Commit

Permalink
Lint (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
enqueue authored Apr 2, 2024
1 parent 2b957b9 commit 4a06ca7
Show file tree
Hide file tree
Showing 15 changed files with 494 additions and 43 deletions.
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.{yml, yaml}]
indent_size = 2
30 changes: 30 additions & 0 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Verify

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
verify:
runs-on: ubuntu-latest
permissions:
contents: read
checks: write
steps:
- uses: actions/checkout@v4

- name: Setup Java and Dependency Caching
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "17"

- name: Setup Gradle
uses: gradle/gradle-build-action@v3

- name: Run Checks
run: ./gradlew --continue clean check
28 changes: 28 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,29 @@
# Gradle work directory
.gradle

# Build output directies
/target
*/target
/build
*/build
testdb
/bin
*/bin

# IntelliJ IDEA
out
*.ipr
*.iml
*.iws
.idea/
.idea_modules/
atlassian-ide-plugin.xml
/.idea/

# Eclipse
.project
.settings/
.classpath

# Visual Studio
.vscode/
20 changes: 13 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
# github-pages-build

Workflows and layouts to build GitHub pages from a Riege Software GitHub repository

## About
This repo provides a reusable workflow for GitHub Actions to be used to
build and deploy [GitHub Pages](https://docs.github.com/en/pages) content from a

This repo provides a reusable workflow for GitHub Actions to be used to
build and deploy [GitHub Pages](https://docs.github.com/en/pages) content from a
GitHub repository.
This repo also provides a general layout with disclaimer, license, imprint etc.

## Usage

GitHub Pages offer a wide range of options in general.
Within Riege Software, our main use of GitHub Pages
Within Riege Software, our main use of GitHub Pages
is for public technical detail documentation for our clients, typically for
interfaces and/or APIs from/to our products.

The basic scenario is a private Riege Software repository which provides some
public information via GitHub Pages.

### Repositiory settings

The repository in question needs to be enabled for GitHub Pages.

Go to repository `Settings`, then on left side in section `Code and automation`
Go to repository `Settings`, then on left side in section `Code and automation`
select `Pages`. Set
* GitHub Pages visibility to **Public** (not required if repository is already public)
* Build and deployment to **GitHub Actions**
Expand All @@ -30,10 +34,10 @@ select `Pages`. Set

### Basic simple scenario with one `docs` folder

The most simple scenario is a repository which contains a top level `docs` folder
The most simple scenario is a repository which contains a top level `docs` folder
containing a markdown file `index.md` plus optionally more content.

To use the reusable workflow, create a file `.github/workflows/pages.yml` in
To use the reusable workflow, create a file `.github/workflows/pages.yml` in
the repository with the following content:

```yaml
Expand Down Expand Up @@ -71,6 +75,7 @@ Summary for your repository
Check the repository workflow `Actions`. There should be an action publishing the GitHub Pages.

### Other scenarios

More complex scenarios than just supporting markdown from one `docs` folder is possible,
but not (yet) supported by github-pages-build.

Expand All @@ -79,4 +84,5 @@ uses an adopted `pages.yml` based upon `pages-generate-from-docs-dir.yml` with
some enhancements.

### Example
This repository also acts as an example, see `docs/index.md` and result on https://riege.github.io/github-pages-build

This repository also acts as an example, see `docs/index.md` and result on https://riege.github.io/github-pages-build
24 changes: 24 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
plugins {
id 'com.diffplug.spotless' version '6.25.0'
}

repositories {
mavenCentral()
}

spotless {
format 'html', {
target '**/*.html'
eclipseWtp('html')
trimTrailingWhitespace()
indentWithSpaces()
endWithNewline()
}
yaml {
target '**/*.yml'
}
flexmark {
target '**/*.md'
flexmark()
}
}
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# GitHub Pages Example

This is the index.md file to demonstrate usage of a general
workflows and layouts to build GitHub pages from a Riege Software GitHub
workflows and layouts to build GitHub pages from a Riege Software GitHub
repository.

For more information, see [github.com/riege/github-pages-build](https://github.com/riege/github-pages-build).
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
group=com.riege
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 7 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 4a06ca7

Please sign in to comment.