mirror of
https://github.com/altstackHQ/altstack-data.git
synced 2026-04-18 00:53:14 +02:00
Add GitHub community standards, templates, and workflows
This commit is contained in:
28
.github/workflows/check-docs.yml
vendored
Normal file
28
.github/workflows/check-docs.yml
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
name: Docs Build Check
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- 'docs/**'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: docs
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
cache: 'npm'
|
||||
cache-dependency-path: 'docs/package-lock.json'
|
||||
|
||||
- name: Install Dependencies
|
||||
run: npm ci || npm install
|
||||
|
||||
- name: Build Nextra Docs
|
||||
run: npm run build
|
||||
28
.github/workflows/validate-data.yml
vendored
Normal file
28
.github/workflows/validate-data.yml
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
name: Validate JSON Data
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'data/**/*.json'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'data/**/*.json'
|
||||
|
||||
jobs:
|
||||
validate:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
- name: Check JSON Validity
|
||||
run: |
|
||||
for file in $(find data -name "*.json"); do
|
||||
echo "Validating $file..."
|
||||
jq empty "$file" || exit 1
|
||||
done
|
||||
echo "All JSON files are valid."
|
||||
Reference in New Issue
Block a user