-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
extends: ['./src/commitlint'], | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module.exports = { | ||
extends: ['./src/eslint/eslint.node'], | ||
overrides: [ | ||
{ | ||
files: ['src/**'], | ||
rules: { | ||
'sort-keys': 'error', | ||
}, | ||
}, | ||
], | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Setup Workflow | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
node_version: | ||
type: string | ||
required: true | ||
|
||
jobs: | ||
setup: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ inputs.node_version}} | ||
|
||
- name: Install pnpm | ||
run: npm install -g pnpm | ||
|
||
- name: Install dependencies with pnpm | ||
run: pnpm install | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Cache pnpm store | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.pnpm-store # Path to pnpm store | ||
key: ${{ runner.os }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }} # Cache key based on OS and lockfile hash | ||
restore-keys: | | ||
${{ runner.os }}-pnpm- |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: CI/CD Workflow | ||
|
||
permissions: | ||
pull-requests: write | ||
contents: write | ||
pages: write | ||
id-token: write | ||
|
||
concurrency: | ||
group: 'pages' | ||
cancel-in-progress: false | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
pipeline: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Install pnpm | ||
run: npm install -g pnpm | ||
|
||
- name: Install dependencies with pnpm | ||
run: pnpm install | ||
|
||
- name: Run Commitlint | ||
run: git log -1 --pretty=%B | pnpm exec commitlint | ||
|
||
- name: Run ESLint | ||
run: pnpm eslint . --max-warnings=0 # Use pnpm | ||
|
||
- name: Run Prettier | ||
run: pnpm prettier --check . # Use pnpm | ||
|
||
- name: Run Semantic Release | ||
if: github.ref == 'refs/heads/main' | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
run: npx semantic-release |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
name: Build, Test, and Deploy Documentation | ||
|
||
on: | ||
push: | ||
branches: ['main'] | ||
pull_request: | ||
branches: ['main'] | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
pages: write | ||
id-token: write | ||
|
||
env: | ||
INSTANCE: 'Writerside/dcs' # Name of the module (adjust for your project) | ||
ARTIFACT: 'webHelpDCS2-all.zip' # Name of the artifact to be generated | ||
DOCKER_VERSION: '242.21870' # Specific Docker version | ||
|
||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} # Ensure access to private repo | ||
fetch-depth: 0 | ||
|
||
- name: Build docs using Writerside Docker builder | ||
uses: JetBrains/writerside-github-action@v4 | ||
with: | ||
instance: ${{ env.INSTANCE }} | ||
artifact: ${{ env.ARTIFACT }} | ||
docker-version: ${{ env.DOCKER_VERSION }} | ||
|
||
- name: Save artifact with build results | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: docs | ||
path: | | ||
artifacts/${{ env.ARTIFACT }} # Artifact inside the artifacts folder | ||
artifacts/report.json | ||
retention-days: 7 | ||
|
||
- name: Unzip artifact | ||
run: | | ||
unzip -O UTF-8 -qq artifacts/${{ env.ARTIFACT }} -d dir | ||
- name: Configure GitHub Pages | ||
uses: actions/configure-pages@v4 | ||
|
||
- name: Upload artifact to GitHub Pages | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: dir | ||
|
||
- name: Deploy to GitHub Pages | ||
uses: actions/deploy-pages@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
needs: build-and-deploy | ||
|
||
steps: | ||
- name: Download artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: docs | ||
path: artifacts | ||
|
||
- name: Test documentation using Writerside Checker | ||
uses: JetBrains/writerside-checker-action@v1 | ||
with: | ||
instance: ${{ env.INSTANCE }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
|
||
.idea | ||
.idea/ | ||
artifacts/ | ||
dir/ | ||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
.nyc_output | ||
coverage.* | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
.DS_Store | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (http://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directory | ||
node_modules/ | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
typings/ | ||
lib/*.js | ||
test/*.js | ||
*.map |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
pnpm exec commitlint --edit "$1" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
pnpm exec lint-staged |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
auto-install-peers = true | ||
@@kurocado-studio:registry=https://www.npmjs.com/settings/kurocado-studio/packages |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
package-lock.json | ||
pnpm-lock.yaml |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require('./src/semantic-release'); |