Skip to content

Commit 16326ef

Browse files
committed
connect gitActions
1 parent 5abbfef commit 16326ef

File tree

2 files changed

+186
-143
lines changed

2 files changed

+186
-143
lines changed

.github/workflows/deploy.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
# Trigger the workflow every time you push to the `main` branch
5+
# Using a different branch name? Replace `main` with your branch’s name
6+
push:
7+
branches: [main]
8+
# Allows you to run this workflow manually from the Actions tab on GitHub.
9+
workflow_dispatch:
10+
11+
# Allow this job to clone the repo and create a page deployment
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout your repository using git
22+
uses: actions/checkout@v5
23+
- name: Install, build, and upload your site
24+
uses: withastro/action@v5
25+
# with:
26+
# path: . # The root location of your Astro project inside the repository. (optional)
27+
# node-version: 24 # The specific version of Node that should be used to build your site. Defaults to 22. (optional)
28+
# package-manager: pnpm@latest # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional)
29+
# build-cmd: pnpm run build # The command to run to build your site. Runs the package build script/task by default. (optional)
30+
# env:
31+
# PUBLIC_POKEAPI: 'https://pokeapi.co/api/v2' # Use single quotation marks for the variable value. (optional)
32+
33+
deploy:
34+
needs: build
35+
runs-on: ubuntu-latest
36+
environment:
37+
name: github-pages
38+
url: ${{ steps.deployment.outputs.page_url }}
39+
steps:
40+
- name: Deploy to GitHub Pages
41+
id: deployment
42+
uses: actions/deploy-pages@v4

astro.config.mjs

Lines changed: 144 additions & 143 deletions
Original file line numberDiff line numberDiff line change
@@ -26,147 +26,148 @@ import { pluginCustomCopyButton } from "./src/plugins/expressive-code/custom-cop
2626

2727
// https://astro.build/config
2828
export default defineConfig({
29-
site: "https://fuwari.vercel.app/",
30-
base: "/",
31-
trailingSlash: "always",
32-
integrations: [
33-
tailwind({
34-
nesting: true,
35-
}),
36-
swup({
37-
theme: false,
38-
animationClass: "transition-swup-", // see https://swup.js.org/options/#animationselector
39-
// the default value `transition-` cause transition delay
40-
// when the Tailwind class `transition-all` is used
41-
containers: ["main", "#toc"],
42-
smoothScrolling: true,
43-
cache: true,
44-
preload: true,
45-
accessibility: true,
46-
updateHead: true,
47-
updateBodyClass: false,
48-
globalInstance: true,
49-
}),
50-
icon({
51-
include: {
52-
"preprocess: vitePreprocess(),": ["*"],
53-
"fa6-brands": ["*"],
54-
"fa6-regular": ["*"],
55-
"fa6-solid": ["*"],
56-
},
57-
}),
58-
expressiveCode({
59-
themes: [expressiveCodeConfig.theme, expressiveCodeConfig.theme],
60-
plugins: [
61-
pluginCollapsibleSections(),
62-
pluginLineNumbers(),
63-
pluginLanguageBadge(),
64-
pluginCustomCopyButton()
65-
],
66-
defaultProps: {
67-
wrap: true,
68-
overridesByLang: {
69-
'shellsession': {
70-
showLineNumbers: false,
71-
},
72-
},
73-
},
74-
styleOverrides: {
75-
codeBackground: "var(--codeblock-bg)",
76-
borderRadius: "0.75rem",
77-
borderColor: "none",
78-
codeFontSize: "0.875rem",
79-
codeFontFamily: "'JetBrains Mono Variable', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace",
80-
codeLineHeight: "1.5rem",
81-
frames: {
82-
editorBackground: "var(--codeblock-bg)",
83-
terminalBackground: "var(--codeblock-bg)",
84-
terminalTitlebarBackground: "var(--codeblock-topbar-bg)",
85-
editorTabBarBackground: "var(--codeblock-topbar-bg)",
86-
editorActiveTabBackground: "none",
87-
editorActiveTabIndicatorBottomColor: "var(--primary)",
88-
editorActiveTabIndicatorTopColor: "none",
89-
editorTabBarBorderBottomColor: "var(--codeblock-topbar-bg)",
90-
terminalTitlebarBorderBottomColor: "none"
91-
},
92-
textMarkers: {
93-
delHue: 0,
94-
insHue: 180,
95-
markHue: 250
96-
}
97-
},
98-
frames: {
99-
showCopyToClipboardButton: false,
100-
}
101-
}),
102-
svelte(),
103-
sitemap(),
104-
],
105-
markdown: {
106-
remarkPlugins: [
107-
remarkMath,
108-
remarkReadingTime,
109-
remarkExcerpt,
110-
remarkGithubAdmonitionsToDirectives,
111-
remarkDirective,
112-
remarkSectionize,
113-
parseDirectiveNode,
114-
],
115-
rehypePlugins: [
116-
rehypeKatex,
117-
rehypeSlug,
118-
[
119-
rehypeComponents,
120-
{
121-
components: {
122-
github: GithubCardComponent,
123-
note: (x, y) => AdmonitionComponent(x, y, "note"),
124-
tip: (x, y) => AdmonitionComponent(x, y, "tip"),
125-
important: (x, y) => AdmonitionComponent(x, y, "important"),
126-
caution: (x, y) => AdmonitionComponent(x, y, "caution"),
127-
warning: (x, y) => AdmonitionComponent(x, y, "warning"),
128-
},
129-
},
130-
],
131-
[
132-
rehypeAutolinkHeadings,
133-
{
134-
behavior: "append",
135-
properties: {
136-
className: ["anchor"],
137-
},
138-
content: {
139-
type: "element",
140-
tagName: "span",
141-
properties: {
142-
className: ["anchor-icon"],
143-
"data-pagefind-ignore": true,
144-
},
145-
children: [
146-
{
147-
type: "text",
148-
value: "#",
149-
},
150-
],
151-
},
152-
},
153-
],
154-
],
155-
},
156-
vite: {
157-
build: {
158-
rollupOptions: {
159-
onwarn(warning, warn) {
160-
// temporarily suppress this warning
161-
if (
162-
warning.message.includes("is dynamically imported by") &&
163-
warning.message.includes("but also statically imported by")
164-
) {
165-
return;
166-
}
167-
warn(warning);
168-
},
169-
},
170-
},
171-
},
29+
site: "https://iftype.github.io",
30+
base: "/",
31+
trailingSlash: "always",
32+
integrations: [
33+
tailwind({
34+
nesting: true,
35+
}),
36+
swup({
37+
theme: false,
38+
animationClass: "transition-swup-", // see https://swup.js.org/options/#animationselector
39+
// the default value `transition-` cause transition delay
40+
// when the Tailwind class `transition-all` is used
41+
containers: ["main", "#toc"],
42+
smoothScrolling: true,
43+
cache: true,
44+
preload: true,
45+
accessibility: true,
46+
updateHead: true,
47+
updateBodyClass: false,
48+
globalInstance: true,
49+
}),
50+
icon({
51+
include: {
52+
"preprocess: vitePreprocess(),": ["*"],
53+
"fa6-brands": ["*"],
54+
"fa6-regular": ["*"],
55+
"fa6-solid": ["*"],
56+
},
57+
}),
58+
expressiveCode({
59+
themes: [expressiveCodeConfig.theme, expressiveCodeConfig.theme],
60+
plugins: [
61+
pluginCollapsibleSections(),
62+
pluginLineNumbers(),
63+
pluginLanguageBadge(),
64+
pluginCustomCopyButton(),
65+
],
66+
defaultProps: {
67+
wrap: true,
68+
overridesByLang: {
69+
shellsession: {
70+
showLineNumbers: false,
71+
},
72+
},
73+
},
74+
styleOverrides: {
75+
codeBackground: "var(--codeblock-bg)",
76+
borderRadius: "0.75rem",
77+
borderColor: "none",
78+
codeFontSize: "0.875rem",
79+
codeFontFamily:
80+
"'JetBrains Mono Variable', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace",
81+
codeLineHeight: "1.5rem",
82+
frames: {
83+
editorBackground: "var(--codeblock-bg)",
84+
terminalBackground: "var(--codeblock-bg)",
85+
terminalTitlebarBackground: "var(--codeblock-topbar-bg)",
86+
editorTabBarBackground: "var(--codeblock-topbar-bg)",
87+
editorActiveTabBackground: "none",
88+
editorActiveTabIndicatorBottomColor: "var(--primary)",
89+
editorActiveTabIndicatorTopColor: "none",
90+
editorTabBarBorderBottomColor: "var(--codeblock-topbar-bg)",
91+
terminalTitlebarBorderBottomColor: "none",
92+
},
93+
textMarkers: {
94+
delHue: 0,
95+
insHue: 180,
96+
markHue: 250,
97+
},
98+
},
99+
frames: {
100+
showCopyToClipboardButton: false,
101+
},
102+
}),
103+
svelte(),
104+
sitemap(),
105+
],
106+
markdown: {
107+
remarkPlugins: [
108+
remarkMath,
109+
remarkReadingTime,
110+
remarkExcerpt,
111+
remarkGithubAdmonitionsToDirectives,
112+
remarkDirective,
113+
remarkSectionize,
114+
parseDirectiveNode,
115+
],
116+
rehypePlugins: [
117+
rehypeKatex,
118+
rehypeSlug,
119+
[
120+
rehypeComponents,
121+
{
122+
components: {
123+
github: GithubCardComponent,
124+
note: (x, y) => AdmonitionComponent(x, y, "note"),
125+
tip: (x, y) => AdmonitionComponent(x, y, "tip"),
126+
important: (x, y) => AdmonitionComponent(x, y, "important"),
127+
caution: (x, y) => AdmonitionComponent(x, y, "caution"),
128+
warning: (x, y) => AdmonitionComponent(x, y, "warning"),
129+
},
130+
},
131+
],
132+
[
133+
rehypeAutolinkHeadings,
134+
{
135+
behavior: "append",
136+
properties: {
137+
className: ["anchor"],
138+
},
139+
content: {
140+
type: "element",
141+
tagName: "span",
142+
properties: {
143+
className: ["anchor-icon"],
144+
"data-pagefind-ignore": true,
145+
},
146+
children: [
147+
{
148+
type: "text",
149+
value: "#",
150+
},
151+
],
152+
},
153+
},
154+
],
155+
],
156+
},
157+
vite: {
158+
build: {
159+
rollupOptions: {
160+
onwarn(warning, warn) {
161+
// temporarily suppress this warning
162+
if (
163+
warning.message.includes("is dynamically imported by") &&
164+
warning.message.includes("but also statically imported by")
165+
) {
166+
return;
167+
}
168+
warn(warning);
169+
},
170+
},
171+
},
172+
},
172173
});

0 commit comments

Comments
 (0)