-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GitHub Actions workflow for building and uploading registry site
- Create a new workflow in build_site.yaml to handle the build and upload process for the registry site to Cloudflare R2. - Move the upload registry step from build_tools.yaml to the new workflow for better organization. - Update PackageList.js to handle null package versions gracefully and enhance author display with improved styling.
- Loading branch information
1 parent
2f44933
commit d6efc49
Showing
3 changed files
with
37 additions
and
15 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Build Registry Site | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build_tools: | ||
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 |
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
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