forked from doodlewind/jshistory-cn
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request doodlewind#19 from doodlewind/f_pagic
Pagic 静态站生成
- Loading branch information
Showing
3 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: gh-pages | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Build | ||
env: | ||
DENO_INSTALL: /home/runner/.deno | ||
run: | | ||
curl -fsSL https://deno.land/x/install/install.sh | sh | ||
export PATH="$DENO_INSTALL/bin:$PATH" | ||
deno --version | ||
deno upgrade --version 1.4.2 | ||
deno install --unstable --allow-env --allow-read --allow-write --allow-net -n pagic https://deno.land/x/[email protected]/mod.ts | ||
pagic build | ||
- name: Deploy | ||
if: github.ref == 'refs/heads/master' && github.event_name == 'push' | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./dist | ||
cname: cn.history.js.org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
.DS_Store | ||
node_modules | ||
.vscode | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// 使用方式:安装 Deno v1.3.3, Pagic v0.9.1 | ||
// curl -fsSL https://deno.land/x/install/install.sh | sh | ||
// deno install --unstable --allow-read --allow-write --allow-net --name=pagic https://deno.land/x/pagic/mod.ts | ||
// ~/.deno/bin/pagic build --serve --watch | ||
|
||
export default { | ||
srcDir: './', | ||
theme: 'docs', | ||
plugins: ['sidebar', 'prev_next'], | ||
title: 'JavaScript 20 年', | ||
description: '自 1995 年语言诞生到 2015 年 ES6 规范制定为止,共计 20 年的 JavaScript 语言演化经历。', | ||
github: 'https://github.com/doodlewind/jshistory-cn', | ||
nav: [ | ||
// { text: '阅读', link: '/' }, | ||
], | ||
sidebar: { | ||
'/': [ | ||
'README.md', | ||
'part-1.md', | ||
'part-2.md', | ||
'part-3.md', | ||
'part-4.md', | ||
'appendices.md', | ||
'notes.md', | ||
'references.md', | ||
], | ||
}, | ||
tools: { | ||
editOnGithub: true, | ||
backToTop: true, | ||
}, | ||
port: 8011 | ||
} |