Skip to content

Commit 69a9ab9

Browse files
committed
chore: use starlight theme
1 parent cec5c97 commit 69a9ab9

39 files changed

+4192
-7956
lines changed

.changeset/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.changeset/config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "restricted",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

.devcontainer.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
2-
"name": "course-template",
3-
"image": "mcr.microsoft.com/devcontainers/typescript-node:1-20-bookworm",
4-
"containerEnv": {
5-
"ASTRO_TELEMETRY_DISABLED": "1"
6-
},
7-
"customizations": {
8-
"vscode": {
9-
"extensions": [
10-
"astro-build.astro-vscode",
11-
"unifiedjs.vscode-mdx"
12-
]
13-
}
14-
}
2+
"name": "course-template",
3+
"image": "mcr.microsoft.com/devcontainers/typescript-node:1-22-bookworm",
4+
"containerEnv": {
5+
"ASTRO_TELEMETRY_DISABLED": "1"
6+
},
7+
"customizations": {
8+
"vscode": {
9+
"extensions": [
10+
"astro-build.astro-vscode",
11+
"unifiedjs.vscode-mdx"
12+
]
13+
}
14+
}
1515
}

.github/workflows/check.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Checks
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- reopened
8+
- synchronize
9+
branches:
10+
- main
11+
push:
12+
branches:
13+
- main
14+
15+
jobs:
16+
version:
17+
name: Check
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
23+
- name: Setup pnpm
24+
uses: pnpm/action-setup@v4
25+
26+
- name: Setup Node
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: 22
30+
registry-url: https://registry.npmjs.org
31+
cache: pnpm
32+
33+
- name: Install dependencies
34+
run: pnpm install --frozen-lockfile
35+
36+
- name: Build
37+
run: pnpm build

.github/workflows/packages.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Publish packages
2+
3+
on:
4+
pull_request:
5+
types:
6+
- closed
7+
branches:
8+
- main
9+
10+
jobs:
11+
publish-packages:
12+
if: github.event.pull_request.merged == true && github.head_ref == 'changeset-release/main'
13+
name: Publish packages
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
with:
19+
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
20+
fetch-depth: 0
21+
filter: tree:0
22+
23+
- name: Setup pnpm
24+
uses: pnpm/action-setup@v4
25+
26+
- name: Setup Node
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: 22
30+
registry-url: https://registry.npmjs.org
31+
cache: pnpm
32+
33+
- name: Install dependencies
34+
run: pnpm install --frozen-lockfile
35+
36+
- name: Publish
37+
uses: changesets/action@v1
38+
id: changesets
39+
with:
40+
version: pnpm version
41+
publish: pnpm tag
42+
env:
43+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
44+
outputs:
45+
ref: ${{ github.ref }}
46+
published: ${{ steps.changesets.outputs.published }}
47+
48+
deploy-to-static-file-host:
49+
name: Deploy to Static File Host
50+
uses: ./.github/workflows/static-file-host.yml
51+
needs: publish-packages
52+
with:
53+
ref: ${{ needs.publish-packages.outputs.ref }}
54+
if: ${{ needs.publish-packages.outputs.published }}

.github/workflows/cd.yml renamed to .github/workflows/static-file-host.yml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,65 @@
1-
# Based on https://github.com/actions/starter-workflows/blob/main/pages/gatsby.yml
2-
name: Continuous Deployment to Github Pages
1+
name: Deploy to static file host
32

43
on:
5-
# Runs on pushes targeting the default branch
6-
push:
7-
branches: [main]
4+
workflow_call:
5+
inputs:
6+
ref:
7+
required: true
8+
type: string
89

9-
# Allows you to run this workflow manually from the Actions tab
10-
workflow_dispatch:
11-
12-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
1310
permissions:
1411
contents: read
1512
pages: write
1613
id-token: write
1714

18-
# Allow one concurrent deployment
1915
concurrency:
2016
group: "pages"
2117
cancel-in-progress: true
2218

23-
# Default to bash
24-
defaults:
25-
run:
26-
shell: bash
19+
env:
20+
BUILD_PATH: "."
2721

2822
jobs:
29-
# Build job
3023
build:
24+
environment:
25+
name: github-pages
26+
url: ${{ steps.deployment.outputs.page_url }}
3127
runs-on: ubuntu-latest
3228
steps:
3329
- name: Checkout
3430
uses: actions/checkout@v4
31+
with:
32+
ref: ${{ inputs.ref }}
3533

3634
- name: Setup pnpm
37-
uses: pnpm/action-setup@v2
35+
uses: pnpm/action-setup@v4
3836

3937
- name: Setup Node
4038
uses: actions/setup-node@v4
4139
with:
42-
node-version: "20"
40+
node-version: 22
4341
cache: "pnpm"
4442

4543
- name: Setup Pages
4644
id: pages
4745
uses: actions/configure-pages@v5
4846

4947
- name: Install dependencies
50-
run: pnpm i
48+
run: pnpm install --frozen-lockfile
49+
working-directory: ${{ env.BUILD_PATH }}
5150

52-
- name: Build
53-
run: pnpm build
54-
env:
55-
BASE_PATH: ${{ steps.pages.outputs.base_path }}
51+
- name: Build with Astro
52+
run: |
53+
pnpm astro build \
54+
--site "${{ steps.pages.outputs.origin }}" \
55+
--base "${{ steps.pages.outputs.base_path }}"
56+
working-directory: ${{ env.BUILD_PATH }}/docs
5657

5758
- name: Upload artifact
5859
uses: actions/upload-pages-artifact@v3
5960
with:
60-
path: ./dist
61+
path: ${{ env.BUILD_PATH }}/docs/dist
6162

62-
# Deployment job
6363
deploy:
6464
environment:
6565
name: github-pages

.github/workflows/version.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Version packages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
version-packages:
10+
name: Version packages
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Setup pnpm
17+
uses: pnpm/action-setup@v4
18+
19+
- name: Setup Node
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: 22
23+
registry-url: https://registry.npmjs.org
24+
cache: pnpm
25+
26+
- name: Install dependencies
27+
run: pnpm install --frozen-lockfile
28+
29+
- name: Create Release Pull Request
30+
uses: changesets/action@v1
31+
id: changesets
32+
with:
33+
commit: "chore: publish new release"
34+
title: "chore: publish new release"
35+
env:
36+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
37+
38+
- name: Get current branch
39+
id: get_branch
40+
run: echo "CURRENT_BRANCH=$(git branch --show-current)" >> $GITHUB_ENV
41+
42+
- name: Update lock file
43+
if: env.CURRENT_BRANCH == 'changeset-release/main'
44+
run: pnpm install --lockfile-only
45+
46+
- name: Commit lock file
47+
if: env.CURRENT_BRANCH == 'changeset-release/main'
48+
uses: stefanzweifel/git-auto-commit-action@v6
49+
with:
50+
commit_message: "chore: update lock file"
51+
branch: changeset-release/main

0 commit comments

Comments
 (0)