Skip to content

Documentation

Documentation #1071

Workflow file for this run

name: Documentation
on:
push:
branches:
- master
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
workflow_dispatch:
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
jobs:
deploy:
name: Deploy kubeblocks.io
runs-on: ubuntu-latest
steps:
- name: Checkout Kubeblocks.io
uses: actions/checkout@v3
- name: Checkout Kubeblocks Docs main
uses: actions/checkout@v3
with:
repository: apecloud/kubeblocks
ref: main
path: ".temp/main"
token: ${{ env.GITHUB_TOKEN }}
- name: Checkout Kubeblocks Docs release-0.8
uses: actions/checkout@v3
with:
repository: apecloud/kubeblocks
ref: release-0.8
path: ".temp/release-0.8"
token: ${{ env.GITHUB_TOKEN }}
- name: Checkout Kubeblocks Docs release-0.9
uses: actions/checkout@v3
with:
repository: apecloud/kubeblocks
ref: release-0.9
path: ".temp/release-0.9"
token: ${{ env.GITHUB_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Reset Docs
run: yarn docs:reset
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Build Docs
run: yarn build
- name: Deploy to aws s3
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_S3_BUCKET: kubeblocks.io
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: us-west-2 # optional: defaults to us-east-1
SOURCE_DIR: build # optional: defaults to entire repository
- name: Invalidate CloudFront
uses: chetan/invalidate-cloudfront-action@v2
env:
DISTRIBUTION: ${{ secrets.DISTRIBUTION }}
PATHS: "/*"
AWS_REGION: "us-east-1"
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}