master deploy

This commit is contained in:
tresabhi committed 2026-08-05 14:09:00 -05:00
1 parent db6c4679b7
commit af58b4614d
2 files changed
+38 -20

No files matched your search

+35 -17
View File
@@ -9,8 +9,6 @@ on:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
@@ -50,7 +48,14 @@ jobs:
strategy:
fail-fast: false
matrix:
chunk: [default, api]
include:
- chunk: default
node: blitzkit/blitzkit.github.io
path: dist/website
- chunk: api
node: blitzkit/api
path: dist/website/api
steps:
- name: Free disk space
@@ -115,20 +120,33 @@ jobs:
BUILD_CHUNK: ${{ matrix.chunk }}
- name: Upload artifact
uses: actions/upload-pages-artifact@v5
id: upload
uses: actions/upload-artifact@v4
with:
path: dist/website
name: chunk-${{ matrix.chunk }}
path: ${{ matrix.path }}
deploy-github-pages:
if: ${{ github.ref == 'refs/heads/production' }}
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
needs: build
environment:
name: Production
url: ${{ steps.deployment.outputs.page_url }}
- name: Save artifact ID
run: |
echo "${{ steps.upload.outputs.artifact-id }}"
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5
- name: Trigger deployment
env:
TOKEN: ${{ secrets.GH_NODE_DEPLOY_TOKEN }}
ARTIFACT_ID: ${{ steps.upload.outputs.artifact-id }}
TARGET_REPO: ${{ matrix.node }}
run: |
curl \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $TOKEN" \
"https://api.github.com/repos/$TARGET_REPO/dispatches" \
-d "{
\"event_type\": \"deploy-pages\",
\"client_payload\": {
\"source_repo\": \"${{ github.repository }}\",
\"run_id\": \"${{ github.run_id }}\",
\"artifact_id\": \"$ARTIFACT_ID\",
\"chunk\": \"${{ matrix.chunk }}\"
}
}"