Skip to content

Commit 33dce8f

Browse files
authored
Prepare versioned docs for v2 (#291)
2 parents 46dd18f + 6a07ad4 commit 33dce8f

File tree

398 files changed

+862
-26180
lines changed

Some content is hidden

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

398 files changed

+862
-26180
lines changed
Lines changed: 2 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,10 @@
11
name: Build Docs Artifacts
2-
description: Builds the documentation artifacts including Docusaus, Sample App and Designer
3-
inputs:
4-
PERSONAL_ACCESS_TOKEN:
5-
description: 'A Github PAT'
6-
required: true
2+
description: Builds the documentation
73
runs:
84
using: "composite"
95
steps:
106
- uses: ./.github/actions/pnpm-setup
117

128
- name: Build Docs
139
shell: bash
14-
run: |
15-
pnpm install --no-frozen-lockfile
16-
npm run build
17-
- uses: actions/setup-node@v4
18-
with:
19-
node-version: 20
20-
registry-url: "https://npm.pkg.github.com"
21-
scope: "@public-ui"
22-
23-
- name: Download designer (v1)
24-
env:
25-
NODE_AUTH_TOKEN: ${{ inputs.PERSONAL_ACCESS_TOKEN }}
26-
shell: bash
27-
run: |
28-
rm -rf package *.tgz
29-
npm pack @public-ui/designer@^1
30-
tar -xzvf public-ui-designer-*.tgz
31-
32-
rm -rf build/v1/designer
33-
mkdir -p build/v1
34-
mv package/dist build/v1/designer
35-
36-
rm -rf package *.tgz
37-
38-
- name: Download sample react (v1)
39-
env:
40-
NODE_AUTH_TOKEN: ${{ inputs.PERSONAL_ACCESS_TOKEN }}
41-
shell: bash
42-
run: |
43-
rm -rf package *.tgz
44-
npm pack @public-ui/sample-react@^1
45-
tar -xzvf public-ui-sample-react-*.tgz
46-
47-
rm -rf build/v1/sample-react
48-
mkdir -p build/v1
49-
mv package/dist build/v1/sample-react
50-
51-
rm -rf package *.tgz
52-
53-
- name: Download designer (v2)
54-
env:
55-
NODE_AUTH_TOKEN: ${{ inputs.PERSONAL_ACCESS_TOKEN }}
56-
shell: bash
57-
run: |
58-
rm -rf package *.tgz
59-
npm pack @public-ui/designer@^2
60-
tar -xzvf public-ui-designer-*.tgz
61-
62-
rm -rf build/v2/designer
63-
mkdir -p build/v2
64-
mv package/dist build/v2/designer
65-
66-
rm -rf package *.tgz
67-
68-
- name: Download sample react (v2)
69-
env:
70-
NODE_AUTH_TOKEN: ${{ inputs.PERSONAL_ACCESS_TOKEN }}
71-
shell: bash
72-
run: |
73-
rm -rf package *.tgz
74-
npm pack @public-ui/sample-react@^2
75-
tar -xzvf public-ui-sample-react-*.tgz
76-
77-
rm -rf build/v2/sample-react
78-
mkdir -p build/v2
79-
mv package/dist build/v2/sample-react
80-
81-
rm -rf package *.tgz
10+
run: npm run build

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ updates:
99
directory: "/"
1010
schedule:
1111
interval: monthly
12-
target-branch: main
12+
target-branch: release/2
1313
# - package-ecosystem: npm
1414
# directory: "/dev"
1515
# ignore:

.github/workflows/auto-dependency-updater.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
with:
1414
fetch-depth: 0
1515
persist-credentials: false
16-
ref: "main"
16+
ref: "release/2"
1717
- uses: ./.github/actions/pnpm-setup
1818
- name: Create new branch
1919
run: git checkout -b chore/auto-update-deps

.github/workflows/draft-deploy.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,25 @@ jobs:
1212
- name: Checkout
1313
uses: actions/checkout@v4
1414

15-
- name: Build Artifacts
15+
- name: Build Docs
1616
uses: ./.github/actions/build-artifacts
1717
with:
1818
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
1919

20+
- name: Move docs
21+
shell: bash
22+
run: |
23+
mkdir -p dist/docs
24+
mv build dist/docs/2.2/
25+
2026
- name: Netlify Deploy
2127
uses: netlify/actions/cli@master
2228
id: netlify
2329
env:
2430
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
2531
NETLIFY_SITE_ID: ${{ vars.NETLIFY_SITE_ID }}
2632
with:
27-
args: deploy --dir=build
33+
args: deploy --dir=dist
2834

2935
- name: Find comment
3036
uses: peter-evans/find-comment@v3
@@ -41,6 +47,6 @@ jobs:
4147
issue-number: ${{ github.event.pull_request.number }}
4248
body: |
4349
Netlify Draft Deployment
44-
URL: ${{ steps.netlify.outputs.NETLIFY_URL }}
50+
URL: ${{ steps.netlify.outputs.NETLIFY_URL }}/docs/2.2
4551
Logs: ${{ steps.netlify.outputs.NETLIFY_LOGS_URL }}
4652
edit-mode: replace

.github/workflows/publish.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Publish GitHub package and trigger main branch update
2+
3+
on:
4+
push:
5+
branches:
6+
- release/2
7+
workflow_dispatch:
8+
9+
jobs:
10+
publish:
11+
permissions:
12+
packages: write
13+
contents: write
14+
pull-requests: write
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Build Artifacts
21+
uses: ./.github/actions/build-artifacts
22+
23+
# Publish packages on GitHub packages
24+
- uses: actions/setup-node@v4
25+
with:
26+
node-version: 22
27+
registry-url: https://npm.pkg.github.com
28+
29+
- name: Bump version
30+
shell: bash
31+
run: |
32+
pnpm version patch --no-git-tag-version
33+
git config user.name "GitHub Actions"
34+
git config user.email "actions@github.com"
35+
git add package.json
36+
git commit -m "chore: Bump version"
37+
38+
- uses: ad-m/github-push-action@master
39+
with:
40+
github_token: ${{ secrets.GITHUB_TOKEN }}
41+
branch: ${{ github.ref }}
42+
43+
- name: Publish Docs
44+
run: npm publish --access restricted
45+
env:
46+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47+
48+
- name: Trigger main branch update
49+
shell: bash
50+
run: gh workflow run update.yml --ref main

.github/workflows/test-deploy.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
name: Netlify Test Deploy - Deploy main branch under fixed alias
1+
name: Netlify Test Deploy - Deploy release branch under fixed alias
22

33
on:
44
push:
55
branches:
6-
- 'main'
6+
- 'release/2'
77
workflow_dispatch:
88

99
jobs:
@@ -13,16 +13,22 @@ jobs:
1313
- name: Checkout
1414
uses: actions/checkout@v4
1515

16-
- name: Build Artifacts
16+
- name: Build Docs
1717
uses: ./.github/actions/build-artifacts
1818
with:
1919
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
2020

21+
- name: Move docs
22+
shell: bash
23+
run: |
24+
mkdir -p dist/docs
25+
mv build dist/docs/2.2/
26+
2127
- name: Netlify Deploy
2228
uses: netlify/actions/cli@master
2329
id: netlify
2430
env:
2531
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
2632
NETLIFY_SITE_ID: ${{ vars.NETLIFY_SITE_ID }}
2733
with:
28-
args: deploy --dir=build --alias="$GITHUB_REF_NAME"
34+
args: deploy --dir=dist --alias="$GITHUB_REF_NAME"

.github/workflows/update.yml

Lines changed: 0 additions & 43 deletions
This file was deleted.

backup/toaster/readme.md

Lines changed: 0 additions & 44 deletions
This file was deleted.

blog/2023-01-04.mdx

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)