Remove CodeQL workflow, add GitHub Pages deployment, and update project documentation
- Remove `codeql.yml` workflow for static security analysis. - Add `pages.yml` workflow for deploying docs to GitHub Pages. - Introduce `CODE_OF_CONDUCT.md` and `FUNDING.yml`. - Update `README.md` with links to GitHub Pages and additional project setup details. - Refine release workflow by splitting build and publish steps, and allowing publish errors for existing versions.
This commit is contained in:
1
.github/workflows/ci.yml
vendored
1
.github/workflows/ci.yml
vendored
@@ -6,7 +6,6 @@ on:
|
||||
pull_request:
|
||||
branches: [ main, master ]
|
||||
|
||||
# Alte Läufe abbrechen, wenn ein neuer Push kommt (spart Zeit)
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
42
.github/workflows/codeql.yml
vendored
42
.github/workflows/codeql.yml
vendored
@@ -1,42 +0,0 @@
|
||||
# CodeQL: static security analysis (free for public repos).
|
||||
name: CodeQL
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main, master ]
|
||||
pull_request:
|
||||
branches: [ main, master ]
|
||||
schedule:
|
||||
- cron: '0 6 * * 1'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
security-events: write
|
||||
actions: read
|
||||
contents: read
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up JDK 21
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 21
|
||||
cache: gradle
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v3
|
||||
with:
|
||||
languages: java
|
||||
|
||||
- name: Build (for CodeQL)
|
||||
run: |
|
||||
chmod +x gradlew
|
||||
./gradlew compileJava --no-daemon
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v3
|
||||
53
.github/workflows/pages.yml
vendored
Normal file
53
.github/workflows/pages.yml
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
# Deploy docs to GitHub Pages (optional)
|
||||
# Enable in repo: Settings → Pages → Source: GitHub Actions
|
||||
# Site will be at https://jakubbbdev.github.io/terminal-ui/
|
||||
|
||||
name: Pages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master, main]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
environment: github-pages
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@v4
|
||||
|
||||
- name: Build site
|
||||
run: |
|
||||
mkdir -p _site
|
||||
cp -r docs _site/
|
||||
cat > _site/index.html << 'EOF'
|
||||
<!DOCTYPE html>
|
||||
<html><head><meta charset="utf-8"><title>terminal-ui</title></head>
|
||||
<body style="font-family:sans-serif;max-width:600px;margin:2rem auto;padding:0 1rem">
|
||||
<h1>terminal-ui</h1>
|
||||
<p>Java library for terminal UIs: tables, prompts, menus, and more.</p>
|
||||
<ul>
|
||||
<li><a href="https://github.com/jakubbbdev/terminal-ui">GitHub repo</a></li>
|
||||
<li><a href="https://github.com/jakubbbdev/terminal-ui#install">Install (README)</a></li>
|
||||
<li><a href="https://github.com/jakubbbdev/terminal-ui/releases">Releases</a></li>
|
||||
<li><a href="https://github.com/jakubbbdev/terminal-ui/tree/master/docs">Docs (markdown)</a></li>
|
||||
</ul>
|
||||
</body></html>
|
||||
EOF
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: _site
|
||||
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
9
.github/workflows/release.yml
vendored
9
.github/workflows/release.yml
vendored
@@ -29,10 +29,15 @@ jobs:
|
||||
- name: Strip v from version
|
||||
run: echo "RELEASE_VERSION=${RELEASE_VERSION#v}" >> $GITHUB_ENV
|
||||
|
||||
- name: Build and publish to GitHub Packages
|
||||
run: chmod +x gradlew && ./gradlew build publish --no-daemon
|
||||
- name: Build
|
||||
run: chmod +x gradlew && ./gradlew build --no-daemon
|
||||
|
||||
- name: Publish to GitHub Packages
|
||||
run: ./gradlew publish --no-daemon
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
continue-on-error: true
|
||||
# 409 = version already exists; use a new tag (e.g. v1.0.2) next time
|
||||
|
||||
- name: Create Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
|
||||
Reference in New Issue
Block a user