Skip to content

Commit 67219be

Browse files
authored
chore: worfklows maintenance (#70)
2 parents f4a9a8a + 19d03a5 commit 67219be

File tree

5 files changed

+77
-20
lines changed

5 files changed

+77
-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: 7 additions & 2 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: startsWith(github.head_ref, 'changeset-release/')
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,7 +25,11 @@ 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
3035
run: pnpm build:docs

.github/workflows/release.yml

Lines changed: 5 additions & 11 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:
@@ -50,15 +53,6 @@ jobs:
5053
echo "hasChangesets: ${{ steps.changesets.outputs.hasChangesets }}"
5154
5255
# Upload docs to GCP ONLY after publishing
53-
- name: Authenticate GCP
56+
- name: Upload docs
5457
if: steps.changesets.outputs.published == 'true'
55-
uses: google-github-actions/auth@v3
56-
with:
57-
credentials_json: '${{ secrets.GCP_CREDENTIALS }}'
58-
59-
- name: Upload docs folder to GCP
60-
if: steps.changesets.outputs.published == 'true'
61-
uses: google-github-actions/upload-cloud-storage@v3
62-
with:
63-
path: 'docs'
64-
destination: 'calycode.com/cli'
58+
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)