mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +02:00
master deploy
This commit is contained in:
1 parent
db6c4679b7
commit
af58b4614d
2 files changed
+38
-20
No files matched your search
@@ -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 }}\"
|
||||
}
|
||||
}"
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
---
|
||||
import { Flex, Heading, Text } from "@radix-ui/themes";
|
||||
import type { GetStaticPaths } from "astro";
|
||||
import { PageWrapper } from "../../../../components/PageWrapper";
|
||||
import BaseLayout from "../../../../layouts/BaseLayout.astro";
|
||||
import { PageWrapper } from "../../../../../components/PageWrapper";
|
||||
import BaseLayout from "../../../../../layouts/BaseLayout.astro";
|
||||
import { getStaticPaths as parentGetStaticPaths } from "../../index.astro";
|
||||
import { AUTH_PROVIDER_NAMES, AUTH_PROVIDERS, Authorize } from "./_index";
|
||||
|
||||
@@ -10,7 +10,7 @@ export const getStaticPaths = (() => {
|
||||
const parentPaths = parentGetStaticPaths();
|
||||
|
||||
return AUTH_PROVIDERS.map((provider) =>
|
||||
parentPaths.map((parent) => ({ params: { ...parent.params, provider } }))
|
||||
parentPaths.map((parent) => ({ params: { ...parent.params, provider } })),
|
||||
).flat();
|
||||
}) satisfies GetStaticPaths;
|
||||
|
||||
|
||||
Reference in new issue
Block a user