From 252ecdaf0004f1721f0023e388a96b80de23fbaf Mon Sep 17 00:00:00 2001 From: SalkCoding Date: Thu, 11 Jun 2026 22:16:18 +0900 Subject: [PATCH] docs: Update README files to include GitHub Wiki link and clarify documentation access - Revised the English and Korean README files to specify that full documentation is available on the GitHub Wiki, which is auto-synced from the `docs/` folder. - Enhanced clarity regarding the location of Korean documentation within the project structure. --- .github/scripts/prepare-pages-site.sh | 39 +++++++++++++++++++++++++++ .github/workflows/ci-cd.yml | 33 ++++++++++++++++++----- .github/workflows/pages.yml | 38 ++++++-------------------- .github/workflows/wiki-sync.yml | 36 +++++++++++++++++++++++++ CHANGELOG.md | 7 +++++ README.ko.md | 2 +- README.md | 2 +- docs/_Sidebar.md | 26 ++++++++++++++++++ release-please-config.json | 1 + 9 files changed, 146 insertions(+), 38 deletions(-) create mode 100644 .github/scripts/prepare-pages-site.sh create mode 100644 .github/workflows/wiki-sync.yml create mode 100644 CHANGELOG.md create mode 100644 docs/_Sidebar.md diff --git a/.github/scripts/prepare-pages-site.sh b/.github/scripts/prepare-pages-site.sh new file mode 100644 index 0000000..921ff04 --- /dev/null +++ b/.github/scripts/prepare-pages-site.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash +set -euo pipefail + +# Builds _site/ for GitHub Project Pages (https://.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/" diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 5832dc8..9d01ce2 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -3,6 +3,7 @@ name: CI/CD on: push: branches: [main] + workflow_dispatch: concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -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: @@ -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: @@ -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 @@ -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 }}" diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 9002af4..69c68b8 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -5,6 +5,7 @@ on: branches: [main] pull_request: branches: [main] + workflow_dispatch: concurrency: group: pages-${{ github.workflow }}-${{ github.ref }} @@ -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 @@ -37,40 +41,14 @@ 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 @@ -78,7 +56,7 @@ jobs: 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 diff --git a/.github/workflows/wiki-sync.yml b/.github/workflows/wiki-sync.yml new file mode 100644 index 0000000..0956f9a --- /dev/null +++ b/.github/workflows/wiki-sync.yml @@ -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/** diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..d73ce13 --- /dev/null +++ b/CHANGELOG.md @@ -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 diff --git a/README.ko.md b/README.ko.md index c604209..f93a5d1 100644 --- a/README.ko.md +++ b/README.ko.md @@ -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/`에서 자동 동기화)에서 제공됩니다. | 페이지 | 설명 | |---|---| diff --git a/README.md b/README.md index 66d7059..bb575dc 100644 --- a/README.md +++ b/README.md @@ -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 | |---|---| diff --git a/docs/_Sidebar.md b/docs/_Sidebar.md new file mode 100644 index 0000000..1ed1195 --- /dev/null +++ b/docs/_Sidebar.md @@ -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) diff --git a/release-please-config.json b/release-please-config.json index de06684..e377123 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -4,6 +4,7 @@ "include-component-in-tag": false, "packages": { ".": { + "changelog-path": "CHANGELOG.md", "extra-files": [ "build.gradle" ]