-
Notifications
You must be signed in to change notification settings - Fork 152
47 lines (38 loc) · 1.35 KB
/
upload-docs.yml
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
name: Build and upload API docs
on:
release:
types: [published]
env:
GH_TOKEN: ${{ github.token }}
permissions:
actions: 'write'
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: tools/evm/docs-generator
steps:
- uses: actions/checkout@v4
- name: Set Up Node.js
uses: actions/setup-node@v4
- name: Get release version
id: get_release_version
run: |
VERSION=$(echo ${{ github.ref }} | sed -e 's/.*v\([0-9]*\.[0-9]*\).*/\1/')
echo VERSION=$VERSION >> $GITHUB_OUTPUT
- name: Build reference docs
run: |
yarn && yarn gen-docs:all
- name: Compress generated docs
run: |
tar czvf iscmagic.tar.gz docs/iscmagic/*
tar czvf iscutils.tar.gz docs/iscutils/*
- name: Upload docs to AWS S3
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_IOTA_WIKI }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_IOTA_WIKI }}
AWS_DEFAULT_REGION: "eu-central-1"
run: |
aws s3 cp iscmagic.tar.gz s3://files.iota.org/iota-wiki/wasp/${{ steps.get_release_version.outputs.VERSION }}/ --acl public-read
aws s3 cp iscutils.tar.gz s3://files.iota.org/iota-wiki/wasp/${{ steps.get_release_version.outputs.VERSION }}/ --acl public-read