-
Notifications
You must be signed in to change notification settings - Fork 11
50 lines (44 loc) · 1.6 KB
/
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
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/