Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new workflow to trigger building and publishing docs, fix release-prod docs step #185

Merged
merged 3 commits into from
Jan 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/build-and-publish-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: 'Build and publish documentation to sdk-docs'

on:
workflow_dispatch: {}
workflow_call:
secrets:
SSH_DEPLOY_KEY:
required: true

jobs:
build-and-deploy-documentation:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
- name: Generate TypeDoc documentation
uses: ./.github/actions/build-docs
- name: Push documentation artifacts to sdk-docs
uses: cpina/github-action-push-to-another-repository@main
env:
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
with:
source-directory: docs
destination-github-username: pinecone-io
destination-repository-name: sdk-docs
user-email: [email protected]
target-branch: main
target-directory: typescript
commit-message: "TypeScript: automated documentation build \n\n pinecone-ts-client merge SHA: ${{ github.sha }}"
25 changes: 4 additions & 21 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,7 @@ on:
workflow_dispatch: {}

jobs:
build-and-deploy-documentation:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup
uses: ./.github/actions/setup
- name: Generate TypeDoc documentation
uses: ./.github/actions/build-docs
- name: Push documentation artifacts to sdk-docs
uses: cpina/github-action-push-to-another-repository@main
env:
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
with:
source-directory: docs
destination-github-username: pinecone-io
destination-repository-name: sdk-docs
user-email: [email protected]
target-branch: main
target-directory: typescript
commit-message: 'TypeScript: automated documentation build - pinecone-ts-client merge SHA: ${{ github.sha }}'
build-and-publish-docs:
name: Build and publish docs to sdk-docs
uses: ./.github/workflows/build-and-publish-docs.yml
secrets: inherit
32 changes: 18 additions & 14 deletions .github/workflows/release-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,29 @@ on:
- 'patch' # bug fixes
- 'minor' # new features, backwards compatible
- 'major' # breaking changes
runTests:
description: 'Run tests before releasing'
required: true
type: choice
default: 'true'
options:
- 'true'
- 'false'

# prevent concurrent releases
concurrency:
group: npm-release
cancel-in-progress: true

jobs:
# integration-tests:
# if: ${{ github.event.inputs.runTests == 'true' }}
# uses: ./.github/workflows/PR.yml
# secrets: inherit
integration-tests:
if: ${{ github.event.inputs.runTests == 'true' }}
uses: ./.github/workflows/PR.yml
secrets: inherit

version-and-release:
name: Release to NPM
# needs: integration-tests
needs: integration-tests
runs-on: ubuntu-latest
outputs:
tagName: ${{ steps.npm-release.outputs.release_tag }}
Expand All @@ -47,12 +55,8 @@ jobs:
npm_token: ${{ secrets.NPM_TOKEN }}
- run: echo "${{ steps.npm-release.outputs.release_tag }} was published"

- name: Generate TypeDoc documentation
uses: ./.github/actions/build-docs
- name: Deploy documentation to gh-pages
uses: s0/git-publish-subdir-action@develop
env:
REPO: self
BRANCH: gh-pages
FOLDER: docs
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}}
build-and-publish-docs:
name: Build and publish docs to sdk-docs
needs: version-and-release
uses: ./.github/workflows/build-and-publish-docs.yml
secrets: inherit
Loading