core, lightspark-sdk updates #236
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: "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" | |
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/ | |
aws s3 sync packages/wallet-sdk/docs/ s3://${{secrets.FRONTEND_BUCKET_DEV}}/docs/js/wallet-sdk/ |