-
Notifications
You must be signed in to change notification settings - Fork 91
54 lines (44 loc) · 1.34 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
name: Update Nodes
on:
push:
branches:
- main
paths:
- 'nodes.json'
jobs:
remove_duplicates:
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Fix Corepack Key Issue
run: |
corepack disable
corepack enable
corepack prepare pnpm@latest --activate
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.17.0
cache: "pnpm"
- name: Install Dependencies
working-directory: apps/workflows
run: pnpm install
- name: Build
working-directory: apps/workflows
run: pnpm build
- name: Run TypeScript Script
working-directory: apps/workflows
env:
TURSO_DATABASE_URL: ${{ secrets.TURSO_DATABASE_URL }}
TURSO_AUTH_TOKEN: ${{ secrets.TURSO_AUTH_TOKEN }}
run: pnpm start
- name: Commit Changes to nodes.json
working-directory: apps/workflows
run: |
git config --global user.email "github-actions@users.noreply.github.com"
git config --global user.name "GitHub Actions"
git add .
git diff-index --quiet HEAD || git commit -m "Update Nodes"
git push