Skip to content

Commit ac04a2b

Browse files
committed
chore: worfklows maintenance
1 parent 3e163ed commit ac04a2b

File tree

5 files changed

+80
-20
lines changed

5 files changed

+80
-20
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# .github/actions/upload-docs/action.yml
2+
name: Upload Docs to GCP
3+
description: Build and upload docs to GCP Storage
4+
runs:
5+
using: 'composite'
6+
steps:
7+
- name: Authenticate GCP
8+
uses: google-github-actions/auth@v3
9+
with:
10+
credentials_json: '${{ secrets.GCP_CREDENTIALS }}'
11+
12+
- name: Upload docs folder to GCP
13+
uses: google-github-actions/upload-cloud-storage@v3
14+
with:
15+
path: 'docs'
16+
destination: 'calycode.com/cli'

.github/workflows/add-docs-to-release.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# .github/workflows/add-docs-to-release.yml
12
name: Generate Docs
23

34
on:
@@ -8,7 +9,7 @@ on:
89

910
jobs:
1011
generate-docs:
11-
if: github.actor == 'github-actions[bot]'
12+
if: github.repository == 'calycode/xano-tools' && github.repository_owner == 'calycode' && startsWith(github.head_ref, 'changeset-release')
1213
runs-on: ubuntu-latest
1314
steps:
1415
- uses: actions/checkout@v4
@@ -24,10 +25,14 @@ jobs:
2425
with:
2526
node-version: 20.x
2627

27-
- run: pnpm install
28+
- name: Install packages
29+
run: pnpm install
30+
31+
- name: Build packages
32+
run: pnpm build:packages
2833

2934
- name: Build Docs
30-
run: pnpm docs:build
35+
run: pnpm build:docs
3136

3237
- name: Commit and push docs
3338
run: |

.github/workflows/release.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# .github/workflows/release.yml
12
name: Release Caly-Xano CLI
23

34
on:
@@ -7,6 +8,8 @@ on:
78

89
jobs:
910
release:
11+
if: github.repository == 'calycode/xano-tools' && github.repository_owner == 'calycode'
12+
1013
name: Release CLI
1114
runs-on: ubuntu-latest
1215
steps:
@@ -36,20 +39,14 @@ jobs:
3639
id: changesets
3740
uses: changesets/action@v1
3841
with:
42+
commit: 'changeset-release'
43+
title: 'Release Version'
3944
publish: pnpm -r publish --access restricted
4045
env:
4146
GITHUB_TOKEN: ${{ secrets.CHANGESETS_GH_TOKEN }}
4247
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
4348

4449
# Upload docs to GCP ONLY after publishing
45-
- name: Authenticate GCP
50+
- name: Upload docs
4651
if: steps.changesets.outputs.published == 'true'
47-
uses: google-github-actions/auth@v3
48-
with:
49-
credentials_json: '${{ secrets.GCP_CREDENTIALS }}'
50-
51-
- name: Upload docs folder to GCP
52-
uses: google-github-actions/upload-cloud-storage@v3
53-
with:
54-
path: 'docs'
55-
destination: 'calycode.com/cli'
52+
uses: './.github/actions/upload-docs'

.github/workflows/upload-docs.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# .github/workflows/upload-docs.yml
2+
name: Release Docs for Caly-Xano CLI
3+
4+
on:
5+
workflow_dispatch
6+
7+
jobs:
8+
release:
9+
name: Release Docs
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repo
13+
uses: actions/checkout@v4
14+
15+
- name: Install pnpm
16+
uses: pnpm/action-setup@v4
17+
with:
18+
version: 10
19+
run_install: true
20+
21+
- name: Setup Node
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: 20.x
25+
registry-url: 'https://registry.npmjs.org'
26+
scope: '@calycode'
27+
always-auth: true
28+
env:
29+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
30+
31+
- name: Install dependencies
32+
run: pnpm install
33+
34+
- name: Build packages
35+
run: pnpm build:packages
36+
37+
- name: Update the docs
38+
run: pnpm build:docs
39+
40+
# Upload docs to GCP ONLY after publishing
41+
- name: Upload docs
42+
uses: './.github/actions/upload-docs'

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@
3131
"author": "Mihály Tóth <[email protected]>",
3232
"devDependencies": {
3333
"@changesets/cli": "^2.29.6",
34-
"@eslint/js": "^9.34.0",
35-
"@types/node": "^24.3.0",
36-
"@typescript-eslint/eslint-plugin": "^8.41.0",
37-
"@typescript-eslint/parser": "^8.41.0",
34+
"@eslint/js": "^9.35.0",
35+
"@types/node": "^24.3.1",
36+
"@typescript-eslint/eslint-plugin": "^8.42.0",
37+
"@typescript-eslint/parser": "^8.42.0",
3838
"esbuild": "^0.25.9",
39-
"eslint": "^9.34.0",
39+
"eslint": "^9.35.0",
4040
"eslint-plugin-import": "^2.32.0",
41-
"knip": "^5.63.0",
42-
"rollup": "^4.49.0",
41+
"knip": "^5.63.1",
42+
"rollup": "^4.50.0",
4343
"rollup-plugin-dts": "^6.2.3",
4444
"strip-ansi": "^7.1.0",
4545
"trash-cli": "^6.0.0",

0 commit comments

Comments
 (0)