Build Registry Site #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Registry Site | |
on: | |
workflow_dispatch: | |
jobs: | |
build_site: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Upload registry | |
env: | |
R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }} | |
R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }} | |
R2_BUCKET: ${{ secrets.R2_BUCKET }} | |
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
run: | | |
cd registry | |
npm ci | |
npm run build | |
export AWS_ACCESS_KEY_ID=${R2_ACCESS_KEY_ID} | |
export AWS_SECRET_ACCESS_KEY=${R2_SECRET_ACCESS_KEY} | |
export AWS_ENDPOINT_URL=https://${CLOUDFLARE_ACCOUNT_ID}.r2.cloudflarestorage.com | |
aws s3 sync ./build/ s3://${R2_BUCKET}/ \ | |
--endpoint-url https://${CLOUDFLARE_ACCOUNT_ID}.r2.cloudflarestorage.com \ | |
--only-show-errors |