forked from digitalocean/openapi
-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (29 loc) · 987 Bytes
/
redoc-index.main.yml
File metadata and controls
33 lines (29 loc) · 987 Bytes
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
name: ReDoc Index Main
# This workflow uploads the latest `docs-preview/redoc-index.html` to the
# team spaces directory when a change is detected on the file.
# The previous file will be overwritten.
on:
push:
branches:
- main
paths:
- 'docs-preview/redoc-index.html'
jobs:
upload-index-preview:
name: Upload Index Preview
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Upload index to spaces
env:
AWS_ACCESS_KEY_ID: ${{ secrets.SPACES_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SPACES_ACCESS_SECRET }}
AWS_DEFAULT_OUTPUT: json
SPACES_PATH: ${{ secrets.SPACES_PATH }}
SPACES_ENDPOINT: ${{ secrets.SPACES_ENDPOINT }}
AWS_EC2_METADATA_DISABLED: true
run: >-
aws s3 cp docs-preview/redoc-index.html
${{ env.SPACES_PATH }}/redoc-index.html
--endpoint=${{ env.SPACES_ENDPOINT }}
--acl public-read