Skip to content

Commit af961ee

Browse files
committed
feat: Add the documentation site of Tiny Blocks.
Builds every library page from the README and composer.json of its repository and from Packagist, draws the dependency graph from the require sections, and publishes the site on GitHub Pages.
0 parents  commit af961ee

66 files changed

Lines changed: 9507 additions & 0 deletions

Some content is hidden

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

‎.github/dependabot.yml‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
version: 2
2+
3+
updates:
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "monthly"
8+
commit-message:
9+
prefix: "build"
10+
labels:
11+
- "dependencies"
12+
- "github-actions"
13+
groups:
14+
github-actions:
15+
patterns:
16+
- "*"
17+
18+
- package-ecosystem: "npm"
19+
directory: "/"
20+
schedule:
21+
interval: "monthly"
22+
commit-message:
23+
prefix: "build"
24+
labels:
25+
- "dependencies"
26+
- "npm"
27+
groups:
28+
dependencies:
29+
patterns:
30+
- "*"
31+
ignore:
32+
- dependency-name: "typescript"
33+
update-types:
34+
- "version-update:semver-major"

‎.github/workflows/auto-assign.yml‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Auto assign issues and pull requests
2+
3+
on:
4+
issues:
5+
types:
6+
- opened
7+
pull_request:
8+
types:
9+
- opened
10+
11+
concurrency:
12+
group: auto-assign-${{ github.event.issue.number || github.event.pull_request.number }}
13+
cancel-in-progress: true
14+
15+
permissions:
16+
issues: write
17+
pull-requests: write
18+
19+
jobs:
20+
auto-assign:
21+
name: Auto assign
22+
runs-on: ubuntu-26.04
23+
timeout-minutes: 5
24+
steps:
25+
- name: Assign issues and pull requests
26+
uses: gustavofreze/auto-assign@3c8ebe3f6f2cc5b92bb8969f13bc5886895f70e3 # 2.1.1
27+
with:
28+
assignees: '${{ vars.ASSIGNEES }}'
29+
github_token: '${{ secrets.GITHUB_TOKEN }}'
30+
allow_self_assign: 'true'
31+
allow_no_assignees: 'true'
32+
assignment_options: 'ISSUE,PULL_REQUEST'

‎.github/workflows/ci.yml‎

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
6+
concurrency:
7+
group: ci-${{ github.event.pull_request.number }}
8+
cancel-in-progress: true
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
review:
15+
name: Review
16+
runs-on: ubuntu-26.04
17+
timeout-minutes: 15
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v7
21+
22+
- name: Setup pnpm
23+
uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
24+
25+
- name: Setup Node
26+
uses: actions/setup-node@v7
27+
with:
28+
cache: pnpm
29+
node-version-file: .nvmrc
30+
31+
- name: Install dependencies
32+
run: pnpm install --frozen-lockfile
33+
34+
- name: Run lint
35+
run: pnpm lint
36+
37+
- name: Run type check
38+
run: pnpm typecheck
39+
40+
tests:
41+
name: Tests
42+
needs: review
43+
runs-on: ubuntu-26.04
44+
timeout-minutes: 15
45+
steps:
46+
- name: Checkout repository
47+
uses: actions/checkout@v7
48+
49+
- name: Setup pnpm
50+
uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
51+
52+
- name: Setup Node
53+
uses: actions/setup-node@v7
54+
with:
55+
cache: pnpm
56+
node-version-file: .nvmrc
57+
58+
- name: Install dependencies
59+
run: pnpm install --frozen-lockfile
60+
61+
- name: Run tests
62+
run: pnpm test
63+
64+
build:
65+
name: Build
66+
needs: tests
67+
runs-on: ubuntu-26.04
68+
timeout-minutes: 15
69+
steps:
70+
- name: Checkout repository
71+
uses: actions/checkout@v7
72+
73+
- name: Setup pnpm
74+
uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
75+
76+
- name: Setup Node
77+
uses: actions/setup-node@v7
78+
with:
79+
cache: pnpm
80+
node-version-file: .nvmrc
81+
82+
- name: Install dependencies
83+
run: pnpm install --frozen-lockfile
84+
85+
- name: Build site
86+
run: pnpm build
87+
88+
- name: Check script budgets
89+
run: pnpm check:budgets

‎.github/workflows/deploy.yml‎

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Deploy site
2+
3+
# The site reads every library from its repository and from Packagist when it is built, so it is built
4+
# again every day to pick up new releases, besides every change to this repository. A library can also
5+
# ask for a build right after a release with a repository_dispatch of type library-released.
6+
on:
7+
push:
8+
branches:
9+
- main
10+
schedule:
11+
- cron: '0 6 * * *'
12+
workflow_dispatch:
13+
repository_dispatch:
14+
types:
15+
- library-released
16+
17+
concurrency:
18+
group: deploy-${{ github.ref }}
19+
cancel-in-progress: true
20+
21+
permissions:
22+
pages: write
23+
contents: read
24+
id-token: write
25+
26+
jobs:
27+
build:
28+
name: Build
29+
runs-on: ubuntu-26.04
30+
timeout-minutes: 15
31+
steps:
32+
- name: Checkout repository
33+
uses: actions/checkout@v7
34+
35+
- name: Setup pnpm
36+
uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
37+
38+
- name: Setup Node
39+
uses: actions/setup-node@v7
40+
with:
41+
cache: pnpm
42+
node-version-file: .nvmrc
43+
44+
- name: Install dependencies
45+
run: pnpm install --frozen-lockfile
46+
47+
- name: Build site
48+
run: pnpm build
49+
50+
- name: Upload site
51+
uses: actions/upload-pages-artifact@v5
52+
with:
53+
path: dist
54+
55+
deploy:
56+
name: Deploy
57+
needs: build
58+
runs-on: ubuntu-26.04
59+
timeout-minutes: 15
60+
environment:
61+
url: ${{ steps.deployment.outputs.page_url }}
62+
name: github-pages
63+
steps:
64+
- id: deployment
65+
name: Deploy to GitHub Pages
66+
uses: actions/deploy-pages@v5
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Validate links
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 1 * *'
6+
workflow_dispatch:
7+
8+
concurrency:
9+
group: validate-links-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
permissions:
13+
issues: write
14+
contents: read
15+
16+
jobs:
17+
link-checker:
18+
name: Link checker
19+
runs-on: ubuntu-26.04
20+
timeout-minutes: 15
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v7
24+
25+
- name: Setup pnpm
26+
uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
27+
28+
- name: Setup Node
29+
uses: actions/setup-node@v7
30+
with:
31+
cache: pnpm
32+
node-version-file: .nvmrc
33+
34+
- name: Install dependencies
35+
run: pnpm install --frozen-lockfile
36+
37+
- name: Build site
38+
run: pnpm build
39+
40+
- id: lychee
41+
name: Check links
42+
uses: lycheeverse/lychee-action@e7477775783ea5526144ba13e8db5eec57747ce8 # v2.9.0
43+
with:
44+
args: "--verbose --no-progress --root-dir ${{ github.workspace }}/dist './README.md' './dist/**/*.html'"
45+
fail: false
46+
47+
- if: steps.lychee.outputs.exit_code != 0
48+
name: Create issue
49+
uses: peter-evans/create-issue-from-file@fca9117c27cdc29c6c4db3b86c48e4115a786710 # v6.0.0
50+
with:
51+
title: Link checker report
52+
labels: 'report, automated-issue'
53+
content-filepath: ./lychee/out.md
54+
55+
- if: steps.lychee.outputs.exit_code != 0
56+
name: Assign issues
57+
uses: gustavofreze/auto-assign@3c8ebe3f6f2cc5b92bb8969f13bc5886895f70e3 # 2.1.1
58+
with:
59+
assignees: '${{ vars.ASSIGNEES }}'
60+
github_token: '${{ secrets.GITHUB_TOKEN }}'
61+
allow_self_assign: 'true'
62+
allow_no_assignees: 'true'
63+
assignment_options: 'ISSUE'

‎.gitignore‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.idea
2+
.astro
3+
dist
4+
node_modules
5+
.pnpm-store
6+
site

‎.lycheeignore‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
lycheeverse/lychee-action@.*
2+
http://localhost.*

‎.nvmrc‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
24.19.0

‎LICENSE‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022-2026 Tiny Blocks
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)