-
-
Notifications
You must be signed in to change notification settings - Fork 245
67 lines (56 loc) · 1.9 KB
/
Copy pathextensions.yml
File metadata and controls
67 lines (56 loc) · 1.9 KB
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: Extensions
on:
push:
branches: [main]
paths:
- "extensions/**"
- "src/features/extensions/**"
- ".github/workflows/extensions.yml"
pull_request:
paths:
- "extensions/**"
- "src/features/extensions/**"
- ".github/workflows/extensions.yml"
workflow_dispatch:
jobs:
validate:
if: github.repository == 'athasdev/athas'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.2
- name: Prepare generated extension CDN output
run: bun run extensions:prepare
- name: Validate extensions
run: bun run extensions:validate
- name: Check generated source changes
run: |
git diff --exit-code extensions src/features/extensions package.json .gitignore || (
echo "Extension source or generated metadata changed. Run the extension scripts locally."
exit 1
)
deploy:
if: github.repository == 'athasdev/athas' && github.ref == 'refs/heads/main' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
needs: validate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.2
- name: Prepare generated extension CDN output
run: bun run extensions:prepare
- name: Deploy extensions CDN
uses: burnett01/rsync-deployments@7.0.2
with:
switches: -avz
path: extensions/generated/cdn/
remote_path: ${{ secrets.EXTENSIONS_CDN_ROOT }}/
remote_host: ${{ secrets.VPS_HOST }}
remote_user: ${{ secrets.VPS_USER }}
remote_key: ${{ secrets.VPS_SSH_KEY }}
remote_port: ${{ secrets.VPS_PORT || 22 }}
- name: Verify installable packages on CDN
run: bun run extensions:verify-cdn