diff --git a/.github/workflows/wangdoc.yml b/.github/workflows/wangdoc.yml
new file mode 100644
index 0000000..c3e5cbe
--- /dev/null
+++ b/.github/workflows/wangdoc.yml
@@ -0,0 +1,36 @@
+name: JavaScript tutorial CI
+on:
+ push:
+ branches:
+ - master
+
+jobs:
+ page-generator:
+ name: Generating pages
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ with:
+ persist-credentials: false
+ - name: Setup Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: 'latest'
+ - name: Install dependencies
+ run: npm install
+ - name: Build pages
+ run: npm run build
+ - name: Deploy to website
+ uses: JamesIves/github-pages-deploy-action@v4
+ with:
+ git-config-name: wangdoc-bot
+ git-config-email: yifeng.ruan@gmail.com
+ repository-name: wangdoc/website
+ token: ${{ secrets.WANGDOC_BOT_TOKEN }}
+ branch: master # The branch the action should deploy to.
+ folder: dist # The folder the action should deploy.
+ target-folder: dist/javascript
+ clean: true # Automatically remove deleted files from the deploy branch
+ commit-message: update from JavaScript tutorial
+
diff --git a/.gitignore b/.gitignore
index 744d17c..01a7204 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
node_modules/
dist/
-package-lock.json
npm-debug.log
+package-lock.json
diff --git a/.travis.yml b/.travis.yml.bak
similarity index 60%
rename from .travis.yml
rename to .travis.yml.bak
index ead9a81..3ad5ed5 100644
--- a/.travis.yml
+++ b/.travis.yml.bak
@@ -1,11 +1,18 @@
language: node_js
node_js:
-- '8'
+- 'node'
branches:
only:
- master
+install:
+- npm ci
+# keep the npm cache around to speed up installs
+cache:
+ directories:
+ - "$HOME/.npm"
+
script: bash ./deploy.sh
env:
global:
diff --git a/README.md b/README.md
index 193c114..b3f09b2 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,8 @@
-本教程全面介绍 JavaScript 核心语法,从最简单的开始讲起,循序渐进、由浅入深,力求清晰易懂。所有章节都带有大量的代码实例,便于理解和模仿,可以用到实际项目中,即学即用。
+本教程全面介绍 JavaScript 核心语法,覆盖了 ES5 和 DOM 规范的所有内容。
+
+内容上从最简单的讲起,循序渐进、由浅入深,力求清晰易懂。所有章节都带有大量的代码实例,便于理解和模仿,可以用到实际项目中,即学即用。
+
+本教程适合初学者当作 JavaScript 语言入门教程,学完后就可以承担实际的网页开发工作,也适合当作日常使用的参考手册。
+
+JavaScript 后续新增的 ES6 语法,请看[《ES6 标准入门教程》](https://wangdoc.com/es6/)。
-本教程适合初学者当作 JavaScript 语言的入门教程,也适合当作日常使用的参考手册。
diff --git a/chapters.yml b/chapters.yml
index 4d53fe1..d15194b 100644
--- a/chapters.yml
+++ b/chapters.yml
@@ -89,3 +89,4 @@
- elements/input.md:
- elements/button.md: