Skip to content

chore: add manual doc uploader #22

chore: add manual doc uploader

chore: add manual doc uploader #22

Workflow file for this run

name: Release Caly-Xano CLI
on:
push:
branches:
- main
jobs:
release:
name: Release CLI
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
run_install: true
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20.x
registry-url: 'https://registry.npmjs.org'
scope: '@calycode'
always-auth: true
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Install dependencies
run: pnpm install
- name: Publish to npm
id: changesets
uses: changesets/action@v1
with:
commit: 'changeset-release'
title: 'Release Version'
publish: pnpm -r publish --access restricted
env:
GITHUB_TOKEN: ${{ secrets.CHANGESETS_GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Log Changesets outputs
run: |
echo "published: ${{ steps.changesets.outputs.published }}"
echo "publishedPackages: ${{ steps.changesets.outputs.publishedPackages }}"
echo "hasChangesets: ${{ steps.changesets.outputs.hasChangesets }}"
# Upload docs to GCP ONLY after publishing
- name: Authenticate GCP
if: steps.changesets.outputs.published == 'true'
uses: google-github-actions/auth@v3
with:
credentials_json: '${{ secrets.GCP_CREDENTIALS }}'
- name: Upload docs folder to GCP
if: steps.changesets.outputs.published == 'true'
uses: google-github-actions/upload-cloud-storage@v3
with:
path: 'docs'
destination: 'calycode.com/cli'