Skip to content

Version Packages (#423) #343

Version Packages (#423)

Version Packages (#423) #343

Workflow file for this run

name: "Documentation"
on:
push:
branches:
- main
jobs:
docs:
runs-on: "ubuntu-22.04"
permissions:
id-token: write
contents: read
steps:
- name: "Checkout"
uses: "actions/checkout@v3"
- name: "Setup Node"
uses: "actions/setup-node@v3"
env:
SKIP_YARN_COREPACK_CHECK: true
with:
node-version-file: ".nvmrc"
cache: "yarn"
cache-dependency-path: "yarn.lock"
- name: Install dependencies with yarn cache
uses: ./.github/actions/yarn-nm-install
with:
cwd: "."
- name: Restore turbo cache
uses: actions/cache@v3
with:
path: ./node_modules/.cache/turbo
# see https://bit.ly/43Til68 - we only need a single cache for all turbo files
# but the cache still needs a unique id in order for it to properly save each time.
# restore-keys will always take the latest matching cache:
key: turbo-checks-${{ runner.os }}-${{ github.run_id }} # Can use time based key as well
restore-keys: |
turbo-checks-${{ runner.os }}
- run: "yarn docs"
- name: "Configure AWS credentials"
uses: "aws-actions/configure-aws-credentials@v1"
with:
role-to-assume: "arn:aws:iam::${{secrets.AWS_ACCOUNT_ID_DEV}}:role/github-actions-sdk"
aws-region: "us-west-2"
- name: "Run aws s3 sync"
run: |
aws s3 sync packages/lightspark-sdk/docs/ s3://${{secrets.FRONTEND_BUCKET_DEV}}/docs/js/lightspark-sdk/