Skip to content

Commit

Permalink
feat: add github ci cd for new document
Browse files Browse the repository at this point in the history
  • Loading branch information
nhannht committed Apr 27, 2024
2 parents 3bdb2a7 + 8dd2159 commit f231fc4
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/build_doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,25 @@ jobs:
path: historica


- name: set up yarn
- name: set up node
uses: actions/setup-node@v4
with:
node-version: '20'

- name: set up wrangler in knowledgebase-template
- name: build and deploy doc
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
run: |
cd quartz
npm install
npm install wrangler
cp ../historica/historica_document/ ./content/ -r
cp ../historica/historica_document/* ./content/ -r
cp ../historica/quartz.config.ts ./
cp ../historica/quartz.layout.ts ./
cp ../historica/wrangler.toml ./
npx quartz build
export CLOUDFLARE_ACCOUNT_ID ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
export CLOUDFLARE_API_TOKEN ${{ secrets.CLOUDFLARE_API_TOKEN }}
wrangler pages deploy
npx wrangler pages deploy
10 changes: 5 additions & 5 deletions quartz.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ const config: QuartzConfig = {
fontOrigin: "googleFonts",
cdnCaching: true,
typography: {
header: "Schibsted Grotesk",
body: "Source Sans Pro",
code: "IBM Plex Mono",
header: "Cinzel Decorative",
body: "Rosarivo",
code: "Jetbrains Mono",
},
colors: {
lightMode: {
Expand All @@ -37,8 +37,8 @@ const config: QuartzConfig = {
darkgray: "#4e4e4e",
dark: "#2b2b2b",
secondary: "#ea1717",
tertiary: "#6e1088",
highlight: "rgb(234,23,23)",
tertiary: "#84a59d",
highlight: "rgb(250,231,234)",
},
darkMode: {
light: "#161618",
Expand Down
2 changes: 1 addition & 1 deletion quartz.layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const sharedPageComponents: SharedLayout = {
footer: Component.Footer(
{
links: {
GitHub: "https://historica.pages.dev",
"Source code": "https://github.com/nhannht/historica",
"RSS": "https://historica.pages.dev/index.xml"
,
},
Expand Down
2 changes: 1 addition & 1 deletion wrangler.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
name="historica-document"
name="historica"
pages_build_output_dir="public"

0 comments on commit f231fc4

Please sign in to comment.