Skip to content

Merge pull request #350 from spacemeshos/v2alpha1-total-count #7

Merge pull request #350 from spacemeshos/v2alpha1-total-count

Merge pull request #350 from spacemeshos/v2alpha1-total-count #7

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