-
-
Notifications
You must be signed in to change notification settings - Fork 755
67 lines (57 loc) · 1.38 KB
/
sync-templates.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
name: Templates
on:
push:
branches:
- main
paths:
- '.github/actions/**'
- '.github/workflows/sync-templates.yml'
- 'scripts/sync-templates.sh'
- 'templates/**'
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
template:
- plate-template
- plate-playground-template
defaults:
run:
working-directory: templates/${{ matrix.template }}
steps:
- uses: actions/checkout@v4
- name: 📦 Install pnpm
- uses: pnpm/action-setup@4
name: Install pnpm
with:
version: 9.15.1
run_install: false
- name: ♻️ Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'
- name: 📥 Install dependencies
run: pnpm install -r
- name: 🏗 Build
run: pnpm build
sync:
needs: build
runs-on: ubuntu-latest
if: ${{ success() }}
strategy:
fail-fast: false
matrix:
template:
- plate-template
- plate-playground-template
steps:
- uses: actions/checkout@v4
- name: 🔄 Sync Templates
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
run: ./scripts/sync-templates.sh "templates/${{ matrix.template }}"
shell: bash