Skip to content

Commit e11eabc

Browse files
committed
Merge branch 'main' of https://github.com/Harbour-Enterprises/SuperDoc into documentation
2 parents 89e6b38 + ca47381 commit e11eabc

617 files changed

Lines changed: 43309 additions & 30692 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/issue-to-linear.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ on:
55
types: [opened]
66

77
env:
8-
LINEAR_TEAM_ID: 79bad215-a49a-4788-ad7e-cc7a77551325
8+
LINEAR_TEAM_ID: ${{ secrets.LINEAR_TEAM_ID}}
99
LINEAR_TOKEN: ${{ secrets.LINEAR_TOKEN }}
10-
LINEAR_STATE_ID: a01c9bd3-963b-43dc-8ae5-ff98297682aa # Triage
10+
LINEAR_STATE_ID: ${{ secrets.LINEAR_STATE_ID }}
1111

1212
jobs:
1313
create-linear-issue:

.github/workflows/npm-publish.yml

Lines changed: 30 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,45 @@
1-
name: Publish Superdoc Package to npm on Tag
1+
name: Publish SuperDoc Package to npm
22

33
on:
44
push:
55
branches:
66
- main
77
paths-ignore:
8-
- 'README.md'
8+
- '*.md'
9+
- 'LICENSE'
910
- '.github/**'
11+
- '.vscode/**'
12+
- '.gitignore'
13+
- '*.toml'
14+
- '*.yml'
15+
- '*.yaml'
16+
- '.prettierrc'
17+
1018
workflow_dispatch:
1119

1220
permissions:
1321
contents: write
1422
actions: write
1523

1624
jobs:
17-
publish:
18-
if: github.actor != 'github-actions[bot]'
25+
run-unit-tests:
26+
uses: ./.github/workflows/run-unit-tests.yml
27+
28+
release:
29+
# Block the workflow until the run-unit-tests job is complete
30+
needs: run-unit-tests
31+
# Only run if:
32+
# 1. It's a workflow_dispatch event OR
33+
# 2. It's a push event AND commit message doesn't contain [skip ci] or release
34+
if: |
35+
github.event_name == 'workflow_dispatch' ||
36+
(github.event_name == 'push' && !contains(github.event.head_commit.message, '[skip ci]'))
1937
runs-on: ubuntu-latest
2038
steps:
2139
- name: Checkout code
2240
uses: actions/checkout@v4
2341
with:
42+
fetch-depth: 0
2443
token: ${{ secrets.SUPERDOC_PAT }}
2544

2645
- name: Setup node
@@ -29,31 +48,17 @@ jobs:
2948
node-version: 22
3049
registry-url: https://registry.npmjs.org/
3150

32-
- name: Install dependencies
33-
run: npm install
34-
35-
- name: Build
36-
run: npm run build
37-
38-
- name: Configure Git Credentials
51+
- name: Configure Git
3952
run: |
4053
git config --global user.name "github-actions[bot]"
4154
git config --global user.email "github-actions[bot]@users.noreply.github.com"
4255
43-
- name: Update versions
44-
run: |
45-
cd packages/superdoc
46-
cp ../../README.md README.md
47-
npm version patch
48-
git add .
49-
git commit -m "[skip ci] Bump version"
50-
git push
51-
env:
52-
GIT_TOKEN: ${{ secrets.SUPERDOC_PAT }}
56+
- name: Install dependencies
57+
run: npm install
5358

54-
- name: Publish
55-
run: |
56-
cd packages/superdoc
57-
npm publish --access public
59+
- name: Release
60+
working-directory: packages/superdoc
5861
env:
62+
GITHUB_TOKEN: ${{ secrets.SUPERDOC_PAT }}
5963
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
64+
run: npm run release

.github/workflows/pre-commit.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Pre-commit
2+
3+
on:
4+
workflow_call: # No inputs needed, but this needs to be here to be called by other workflows
5+
6+
jobs:
7+
pre-commit:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
with:
12+
fetch-depth: 0
13+
14+
- name: Set up Python
15+
uses: actions/setup-python@v5
16+
with:
17+
python-version: '3.x'
18+
19+
- name: Install pre-commit
20+
run: |
21+
python -m pip install --upgrade pip
22+
pip install pre-commit
23+
24+
- name: Run pre-commit
25+
run: |
26+
pre-commit run --all-files
27+
28+
# Upload pre-commit cache to speed up future runs
29+
- name: Upload pre-commit cache
30+
uses: actions/cache@v4
31+
with:
32+
path: ~/.cache/pre-commit
33+
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}

.github/workflows/pull-request.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Pull-request to main
2+
3+
on:
4+
pull_request:
5+
branches: ["main"]
6+
7+
jobs:
8+
pre-commit:
9+
uses: ./.github/workflows/pre-commit.yml
10+
11+
run-unit-tests:
12+
uses: ./.github/workflows/run-unit-tests.yml
13+
14+
run-e2e-tests:
15+
uses: ./.github/workflows/run-e2e-tests.yml

.github/workflows/push-main.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: Push to main
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
pre-commit:
10+
uses: ./.github/workflows/pre-commit.yml
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Run E2E tests
2+
3+
on:
4+
workflow_call: # No inputs needed, but this needs to be here to be called by other workflows
5+
6+
jobs:
7+
run-e2e-tests:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v4
12+
13+
- name: Install dependencies
14+
run: npm ci
15+
16+
- name: Build
17+
run: npm run build
18+
19+
- name: Run E2E tests
20+
run: npm run test:e2e
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Run unit tests
2+
3+
on:
4+
workflow_call: # No inputs needed, but this needs to be here to be called by other workflows
5+
6+
jobs:
7+
run-unit-tests:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v4
12+
13+
- name: Setup node
14+
uses: actions/setup-node@v4
15+
with:
16+
node-version: 22
17+
cache: npm
18+
19+
- name: Install dependencies
20+
run: npm ci
21+
22+
- name: Build
23+
run: npm run build
24+
25+
- name: Run tests
26+
run: npm test

.gitignore

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,13 @@ lerna-debug.log*
2929
*.sln
3030
*.sw?
3131

32-
# VuePress
33-
.vuepress/.temp
34-
.vuepress/.cache
35-
.vuepress/dist
32+
# VitePress
33+
.vitepress/.temp
34+
.vitepress/.cache
35+
.vitepress/dist
3636

37-
packages/super-editor/src/tests/data/*
37+
packages/super-editor/src/tests/data/*
38+
39+
# Playwright
40+
test-results
41+
*.tgz

.gitleaks.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[extend]
2+
useDefault = true
3+
4+
[allowlist]
5+
paths = ['''test/.*''', '''tests/.*''']

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
repos:
2+
- repo: https://github.com/gitleaks/gitleaks
3+
rev: v8.23.0
4+
hooks:
5+
- id: gitleaks

0 commit comments

Comments
 (0)