Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/scripts/prepare-pages-site.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/usr/bin/env bash
set -euo pipefail

# Builds _site/ for GitHub Project Pages (https://<org>.github.io/Oswl/).
# Usage: .github/scripts/prepare-pages-site.sh [owner/repo]

REPO="${1:-}"
ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
cd "$ROOT"

mkdir -p _site
cp src/main/resources/static/landing/index.html _site/index.html
cp -r src/main/resources/static/css _site/
cp -r src/main/resources/static/icon _site/
cp -r src/main/resources/static/graphic _site/
mkdir -p _site/img
cp -r src/main/resources/static/img/screenshots _site/img/
touch _site/.nojekyll

LICENSE_LINK="${REPO:+https://github.com/${REPO}/blob/main/LICENSE}"
LICENSE_LINK="${LICENSE_LINK:-https://github.com/SalkCoding/Oswl/blob/main/LICENSE}"

# Root-absolute asset paths break on Project Pages; rewrite to relative paths.
sed -i \
-e 's|href="/css/|href="css/|g' \
-e 's|href="/icon/|href="icon/|g' \
-e 's|src="/icon/|src="icon/|g' \
-e 's|src="/graphic/|src="graphic/|g' \
-e 's|src="/img/|src="img/|g' \
-e "s|href=\"/oss-notices\"|href=\"${LICENSE_LINK}\"|g" \
_site/index.html

test -f _site/index.html
test -f _site/css/tailwind.css
test -f _site/icon/icon-logo.svg
test -f _site/graphic/symbol_w.svg
test -f _site/img/screenshots/security-center.png

echo "Pages site ready at _site/"
33 changes: 27 additions & 6 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: CI/CD
on:
push:
branches: [main]
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -11,6 +12,10 @@ concurrency:
permissions:
contents: write
pull-requests: write
issues: write

env:
GRADLE_OPTS: -Dorg.gradle.daemon=false -Djava.net.preferIPv4Stack=true

jobs:
build:
Expand All @@ -34,7 +39,7 @@ jobs:
run: ./gradlew --no-daemon clean test bootJar verifyProdJar

release-please:
name: Version & Release PR
name: Version & Release
needs: build
runs-on: ubuntu-latest
outputs:
Expand All @@ -44,18 +49,24 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Release Please
id: release
uses: googleapis/release-please-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
config-file: release-please-config.json
manifest-file: .release-please-manifest.json

publish:
name: Publish JAR
needs: [build, release-please]
if: needs.release-please.outputs.release_created == 'true'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout release tag
uses: actions/checkout@v4
Expand All @@ -76,10 +87,20 @@ jobs:
id: jar
run: |
VERSION=$(./gradlew -q properties | awk '/^version:/ {print $2}')
echo "path=build/libs/oswl-${VERSION}.jar" >> "$GITHUB_OUTPUT"
JAR_PATH="build/libs/oswl-${VERSION}.jar"
if [ ! -f "$JAR_PATH" ]; then
echo "::error::JAR not found at ${JAR_PATH}"
ls -la build/libs/ || true
exit 1
fi
echo "path=${JAR_PATH}" >> "$GITHUB_OUTPUT"
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"

- name: Upload JAR to GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ needs.release-please.outputs.tag_name }}
files: ${{ steps.jar.outputs.path }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload "${{ needs.release-please.outputs.tag_name }}" \
"${{ steps.jar.outputs.path }}" \
--clobber
echo "Uploaded oswl-${{ steps.jar.outputs.version }}.jar to ${{ needs.release-please.outputs.tag_name }}"
38 changes: 8 additions & 30 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

concurrency:
group: pages-${{ github.workflow }}-${{ github.ref }}
Expand All @@ -15,6 +16,9 @@ permissions:
pages: write
id-token: write

env:
GRADLE_OPTS: -Dorg.gradle.daemon=false -Djava.net.preferIPv4Stack=true

jobs:
build:
name: Build Landing Site
Expand All @@ -37,48 +41,22 @@ jobs:
run: ./gradlew --no-daemon buildTailwindCss

- name: Prepare site
run: |
mkdir -p _site
cp src/main/resources/static/landing/index.html _site/index.html
cp -r src/main/resources/static/css _site/
cp -r src/main/resources/static/icon _site/
cp -r src/main/resources/static/graphic _site/
mkdir -p _site/img
cp -r src/main/resources/static/img/screenshots _site/img/
touch _site/.nojekyll

# Rewrite root-absolute asset paths to relative paths for GitHub Project Pages.
sed -i \
-e 's|href="/css/|href="css/|g' \
-e 's|href="/icon/|href="icon/|g' \
-e 's|src="/icon/|src="icon/|g' \
-e 's|src="/graphic/|src="graphic/|g' \
-e 's|src="/img/|src="img/|g' \
-e 's|href="/oss-notices"|href="https://github.com/${{ github.repository }}/blob/main/LICENSE"|g' \
_site/index.html

- name: Verify site artifacts
run: |
test -f _site/index.html
test -f _site/css/tailwind.css
test -f _site/icon/icon-logo.svg
test -f _site/graphic/symbol_w.svg
test -f _site/img/screenshots/security-center.png
run: bash .github/scripts/prepare-pages-site.sh "${{ github.repository }}"

- name: Configure Pages
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
uses: actions/configure-pages@v5

- name: Upload Pages artifact
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
uses: actions/upload-pages-artifact@v3
with:
path: _site

deploy:
name: Deploy to GitHub Pages
needs: build
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
runs-on: ubuntu-latest
environment:
name: github-pages
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/wiki-sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Sync Docs to Wiki

on:
push:
branches: [main]
paths:
- 'docs/**'
- '!docs/ko/**'
- '.github/workflows/wiki-sync.yml'
workflow_dispatch:

concurrency:
group: wiki-sync-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: write

jobs:
sync-wiki:
name: Sync docs to GitHub Wiki
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Sync to GitHub Wiki
uses: Andrew-Chen-Wang/github-wiki-action@v5.0.4
with:
path: docs/
strategy: clone
preprocess: true
disable-empty-commits: true
commit-message: "wiki: sync from ${{ github.sha }}"
ignore: |
ko/**
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Changelog

## [1.0.0](https://github.com/SalkCoding/Oswl/releases/tag/v1.0.0) (2026-06-10)

### Features

* Initial OsWL release
2 changes: 1 addition & 1 deletion README.ko.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ Library (프로젝트 간 공유 — group:artifact@version)

## 문서

전체 문서는 [`docs/ko/`](docs/ko/) 폴더에서 확인할 수 있습니다:
한국어 문서는 [`docs/ko/`](docs/ko/) 폴더에서 확인할 수 있습니다. 영문 문서는 [`docs/`](docs/) 및 [GitHub Wiki](https://github.com/SalkCoding/Oswl/wiki) (`main` push 시 `docs/`에서 자동 동기화)에서 제공됩니다.

| 페이지 | 설명 |
|---|---|
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ Interactive Swagger UI is available in the **`local` profile** at `http://localh

## Documentation

Full documentation is available in the [`docs/`](docs/) folder:
Full documentation is available in the [`docs/`](docs/) folder and on the [GitHub Wiki](https://github.com/SalkCoding/Oswl/wiki) (auto-synced from `docs/` on push to `main`). Korean docs live in [`docs/ko/`](docs/ko/).

| Page | Description |
|---|---|
Expand Down
26 changes: 26 additions & 0 deletions docs/_Sidebar.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
**[Home](Home)**

### Guides
* [Getting Started](Getting-Started)
* [User Guide](User-Guide)
* [Quick Import](Quick-Import)
* [CLI Integration](CLI-Integration)
* [Scan History](Scan-History)

### Analysis
* [Security Center](Security-Center)
* [License Analysis](License-Analysis)
* [Risk Trend](Risk-Trend)
* [Version Diff](Version-Diff)

### Administration
* [Administration](Administration)
* [Authorization layers](Authorization-Layers)
* [Project access control](Project-Access-Control)
* [Production deployment](Production-Deployment-Checklist)
* [Database schema](Database-Schema)
* [Scan API security](Scan-Api-Security)

### Reference
* [API Reference](API-Reference)
* [Glossary](Glossary)
1 change: 1 addition & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"include-component-in-tag": false,
"packages": {
".": {
"changelog-path": "CHANGELOG.md",
"extra-files": [
"build.gradle"
]
Expand Down
Loading