Deploy docs liya/DEV-2296-deploy-docs to S3 staging by @liyaka #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
jobs: | |
upload: | |
runs-on: ubuntu-latest | |
environment: ${{ inputs.environment }} | |
steps: | |
- name: checkout | |
uses: actions/[email protected] | |
- name: Build docs | |
run: | | |
echo "Build docimentation" | |
cd apps/opik-documentation/documentation | |
npm install | |
npm run build | |
cd - | |
echo "Build sdk documentation" | |
cd apps/opik-documentation/python-sdk-docs | |
pip install -r requirements.txt | |
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 |