Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions .github/workflows/deploey.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Prepare stable share IDs
run: pnpm share-links:prepare

- name: Require generated IDs to be committed
run: git diff --exit-code -- .vitepress/data/share-links.json

- name: Check committed secrets
run: pnpm check:secrets

Expand All @@ -53,7 +59,7 @@ jobs:
run: pnpm test

build:
name: Build VitePress site
name: Build YuuFrag and short-link artifacts
if: github.event_name != 'pull_request'
needs: quality
runs-on: ubuntu-latest
Expand Down Expand Up @@ -84,7 +90,21 @@ jobs:
- name: Build with VitePress
run: pnpm docs:build

- name: Upload artifact
- name: Verify stable registry remains clean
run: git diff --exit-code -- .vitepress/data/share-links.json

- name: Verify both share-link artifacts
run: pnpm share-links:artifacts:check

- name: Upload standalone short-link archive
uses: actions/upload-artifact@v4
with:
name: yuufrag-shortlinks
path: .shortlink-dist
if-no-files-found: error
retention-days: 30

- name: Upload YuuFrag Pages artifact
uses: actions/upload-pages-artifact@v4
with:
path: .vitepress/dist
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
.vitepress/dist
.vitepress/.temp
.vitepress/generated/
.shortlink-dist/
public/contributors/
dist
cache
Expand Down
7 changes: 6 additions & 1 deletion .vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ import {
writeLegacyPageRedirects,
} from "./utilities/page-route-plugin";
import { createPageRouteRewriter } from "./utilities/route-paths";
import { ShareLinkManifestPlugin } from "./utilities/share-link-manifest-plugin";
import { baseUrl } from "./shared/site-config";

const baseUrl = "https://yuufrag.machillka.com";
const feedUrl = `${baseUrl}/feed.rss`;
const contributorIndex = await prepareGithubContributors(contributorsConfig);

Expand Down Expand Up @@ -124,6 +125,7 @@ export default defineConfig({
text: "分类",
items: ScanCurrentDir("../../posts/", "posts"),
},
{ component: "ShareButton" },
],
sidebar: {
"/guide/": [
Expand Down Expand Up @@ -151,6 +153,9 @@ export default defineConfig({
vite: {
plugins: [
PageRoutePlugin(),
ShareLinkManifestPlugin({
manifestFile: ".vitepress/generated/share-links-manifest.json",
}),
RssPlugin(RSS),
RssAssetPlugin({ baseUrl, filename: "feed.rss" }),
],
Expand Down
Loading
Loading