-
Notifications
You must be signed in to change notification settings - Fork 131
59 lines (55 loc) · 1.99 KB
/
deploy_docs.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Deploy Opik docs
run-name: Deploy docs ${{ github.ref_name }} to S3 ${{ inputs.environment }} by @${{ github.actor }}
on:
workflow_dispatch:
inputs:
environment:
type: choice
description: Choose environment
options:
- staging
- production
- development
jobs:
upload:
runs-on: ubuntu-latest
environment: ${{ inputs.environment }}
steps:
- name: checkout
uses: actions/checkout@v4
- name: Build docs
run: |
echo "Build documentation"
cd apps/opik-documentation/documentation
pip install -r requirements.txt
npm install
npm run build
cd -
echo "Build sdk documentation"
cd apps/opik-documentation/python-sdk-docs
pip install -r requirements.txt
pip install ../../../sdks/python
make build
cd -
- name: Upload docs to S3 ${{ inputs.environment }}
uses: jakejarvis/s3-sync-action@master
with:
args: --follow-symlinks --delete --exclude '.git*'
env:
AWS_S3_BUCKET: site.comet.com
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: us-east-1
DEST_DIR: ${{ inputs.environment }}/docs-opik
SOURCE_DIR: apps/opik-documentation/documentation/build
- name: Upload sdk docs to S3 ${{ inputs.environment }}
uses: jakejarvis/s3-sync-action@master
with:
args: --follow-symlinks --delete --exclude '.git*'
env:
AWS_S3_BUCKET: site.comet.com
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: us-east-1
DEST_DIR: ${{ inputs.environment }}/docs-opik/python-sdk-reference
SOURCE_DIR: apps/opik-documentation/python-sdk-docs/build/html