-
-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (66 loc) · 1.75 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Main
on:
workflow_dispatch:
push:
branches:
- main
permissions:
contents: read
pages: write
id-token: write
jobs:
run_checks:
name: Run code checks
uses: spuxx-dev/ci-cd/.github/workflows/pnpm_run_checks.yml@v4.1.0
with:
PREPARE: pnpm -r --filter './packages/**' build
run_unit_tests:
name: Run tests (vitest)
uses: spuxx-dev/ci-cd/.github/workflows/pnpm_run_tests_vitest.yml@v4.1.0
with:
PREPARE: pnpm -r --filter './packages/**' build
run_release_please:
name: Release Please
uses: spuxx-dev/ci-cd/.github/workflows/pnpm_release-please.yml@v4.1.0
needs:
- run_checks
- run_unit_tests
secrets:
TOKEN: ${{ secrets.RELEASE_PLEASE_TOKEN }}
deploy_pages:
name: Deploy Starlight App to GitHub Pages
runs-on: ubuntu-latest
needs:
- run_checks
# - run_unit_tests
strategy:
matrix:
node-version: [22]
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Build dependencies
run: pnpm -r --filter './packages/**' build
- name: Generate docs
run: pnpm run docs:generate
- name: Build and deploy
uses: withastro/action@v3
with:
path: ./apps/starlight
node-version: 22
package-manager: pnpm@latest
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4