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:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
pages: write
|
|
||||||
id-token: write
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
@@ -50,7 +48,14 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
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:
|
steps:
|
||||||
- name: Free disk space
|
- name: Free disk space
|
||||||
@@ -115,20 +120,33 @@ jobs:
|
|||||||
BUILD_CHUNK: ${{ matrix.chunk }}
|
BUILD_CHUNK: ${{ matrix.chunk }}
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-pages-artifact@v5
|
id: upload
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
path: dist/website
|
name: chunk-${{ matrix.chunk }}
|
||||||
|
path: ${{ matrix.path }}
|
||||||
|
|
||||||
deploy-github-pages:
|
- name: Save artifact ID
|
||||||
if: ${{ github.ref == 'refs/heads/production' }}
|
run: |
|
||||||
name: Deploy to GitHub Pages
|
echo "${{ steps.upload.outputs.artifact-id }}"
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: build
|
|
||||||
environment:
|
|
||||||
name: Production
|
|
||||||
url: ${{ steps.deployment.outputs.page_url }}
|
|
||||||
|
|
||||||
steps:
|
- name: Trigger deployment
|
||||||
- name: Deploy to GitHub Pages
|
env:
|
||||||
id: deployment
|
TOKEN: ${{ secrets.GH_NODE_DEPLOY_TOKEN }}
|
||||||
uses: actions/deploy-pages@v5
|
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 { Flex, Heading, Text } from "@radix-ui/themes";
|
||||||
import type { GetStaticPaths } from "astro";
|
import type { GetStaticPaths } from "astro";
|
||||||
import { PageWrapper } from "../../../../components/PageWrapper";
|
import { PageWrapper } from "../../../../../components/PageWrapper";
|
||||||
import BaseLayout from "../../../../layouts/BaseLayout.astro";
|
import BaseLayout from "../../../../../layouts/BaseLayout.astro";
|
||||||
import { getStaticPaths as parentGetStaticPaths } from "../../index.astro";
|
import { getStaticPaths as parentGetStaticPaths } from "../../index.astro";
|
||||||
import { AUTH_PROVIDER_NAMES, AUTH_PROVIDERS, Authorize } from "./_index";
|
import { AUTH_PROVIDER_NAMES, AUTH_PROVIDERS, Authorize } from "./_index";
|
||||||
|
|
||||||
@@ -10,7 +10,7 @@ export const getStaticPaths = (() => {
|
|||||||
const parentPaths = parentGetStaticPaths();
|
const parentPaths = parentGetStaticPaths();
|
||||||
|
|
||||||
return AUTH_PROVIDERS.map((provider) =>
|
return AUTH_PROVIDERS.map((provider) =>
|
||||||
parentPaths.map((parent) => ({ params: { ...parent.params, provider } }))
|
parentPaths.map((parent) => ({ params: { ...parent.params, provider } })),
|
||||||
).flat();
|
).flat();
|
||||||
}) satisfies GetStaticPaths;
|
}) satisfies GetStaticPaths;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user