-
Notifications
You must be signed in to change notification settings - Fork 9
42 lines (36 loc) · 1.16 KB
/
swagger_build-deploy.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
name: Build and Push Swagger-UI to R2 mainnet-api-docs.spacemesh.network
on:
push:
branches:
- master
paths:
- 'release/openapi/swagger/src/**'
jobs:
build-deploy:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Use Node.js v20.14.0
uses: actions/setup-node@v4
with:
node-version: '20.14.0'
- name: npm install
run: npm install
working-directory: release/openapi/swagger
- name: npm build
run: npm run build
working-directory: release/openapi/swagger
- uses: actions/upload-artifact@v4
with:
name: swagger-ui-build
path: release/openapi/swagger/dist
- uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_S3_BUCKET: ${{ secrets.CLOUDFLARE_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.CLOUDFLARE_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.CLOUDFLARE_SECRET_ACCESS_KEY }}
SOURCE_DIR: release/openapi/swagger/dist
DEST_DIR: ''
AWS_S3_ENDPOINT: https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com