Skip to content

fix: hide pull integration setup steps #7

fix: hide pull integration setup steps

fix: hide pull integration setup steps #7

name: Upload integration docs to OSS
on:
push:
branches: [main, test]
paths:
- 'integration-docs/**'
- 'zh/on-call/integration/**'
- 'en/on-call/integration/**'
- 'zh/on-call/configuration/templates.mdx'
- 'en/on-call/configuration/templates.mdx'
workflow_dispatch:
inputs:
environment:
description: 'Target environment'
required: true
default: 'development'
type: choice
options:
- development
- production
jobs:
build-check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- name: Build compatibility bundle
working-directory: integration-docs
run: npm run build
- name: Check compatibility bundle
working-directory: integration-docs
run: npm run check
upload-development:
needs: build-check
if: github.ref == 'refs/heads/test' || (github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'development')
runs-on: ubuntu-latest
environment: development
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install dependencies
working-directory: integration-docs
run: npm install
- name: Upload development integration docs
working-directory: integration-docs
env:
CDN_ACCESS_KEY: ${{ secrets.CDN_ACCESS_KEY }}
CDN_SECRET_KEY: ${{ secrets.CDN_SECRET_KEY }}
CDN_BUCKET: ${{ secrets.CDN_BUCKET }}
CDN_REGION: ${{ secrets.CDN_REGION }}
CDN_ENDPOINT: ${{ secrets.CDN_ENDPOINT }}
CDN_URL: ${{ secrets.CDN_URL }}
CDN_DIR: '/test/docs'
run: npm run upload
upload-production:
needs: build-check
if: github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'production'
runs-on: ubuntu-latest
environment: production
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install dependencies
working-directory: integration-docs
run: npm install
- name: Upload production integration docs
working-directory: integration-docs
env:
CDN_ACCESS_KEY: ${{ secrets.CDN_ACCESS_KEY }}
CDN_SECRET_KEY: ${{ secrets.CDN_SECRET_KEY }}
CDN_BUCKET: ${{ secrets.CDN_BUCKET }}
CDN_REGION: ${{ secrets.CDN_REGION }}
CDN_ENDPOINT: ${{ secrets.CDN_ENDPOINT }}
CDN_URL: ${{ secrets.CDN_URL }}
CDN_DIR: '/docs'
run: npm run upload