From c9f7f11e2db2262fae5efc556df8a2c359e95cd0 Mon Sep 17 00:00:00 2001
From: Leon Xu <6479451-leonxu260@users.noreply.gitlab.com>
Date: Thu, 26 Aug 2021 23:02:48 -0700
Subject: [PATCH] fix: spelling error in README.md
---
README.md | 108 +++++++++++++++++++++++++++---------------------------
1 file changed, 54 insertions(+), 54 deletions(-)
diff --git a/README.md b/README.md
index daed0b3..a761fd2 100644
--- a/README.md
+++ b/README.md
@@ -11,12 +11,12 @@ View site: https://angulareportfolio.pw
- Package - view [`package.json`]
## Requirements
[Hexo] is a [SSG] powered by [NodeJS][node]. So we'll need this first:
-- Node JS environment
+- Node JS environment
- [npm] (package manager)
- [git] core
## Script
-We already have a Node image on [Docker Library][docker-lib], so we'll require it to run our script on the
-environment of NodeJS.
+We already have a Node image on [Docker Library][docker-lib], so we'll require it to run our script on the
+environment of NodeJS.
This will bring `npm` and `git` core with it: `image: node:latest`
@@ -34,13 +34,13 @@ We'll set the the `npm` modules and its dependecies as a `cache` to speed up our
```yaml
cache:
- paths:
+ paths:
- node_modules/
```
### GitLab-CI
We need to prepare our `gitlab-ci.yml` configuration file to do as we described previously.
-We'll also need a `pages` job and finally a `public` folder with our `artifacts`, afecting only our `master` branch:
+We'll also need a `pages` job and finally a `public` folder with our `artifacts`, affecting only our `master` branch:
```yaml
@@ -48,7 +48,7 @@ We'll also need a `pages` job and finally a `public` folder with our `artifacts`
image: node:latest
# add 'node_modules' to cache for speeding up builds
cache:
- paths:
+ paths:
- node_modules/ # Node modules and dependencies
before_script:
- npm install -g hexo-cli # Install Hexo itself
@@ -63,7 +63,7 @@ pages:
- hexo generate # Hexo generate Static Site
artifacts:
paths:
- - public
+ - public
only:
- master # this job will affect only the 'master' branch
```
@@ -77,7 +77,7 @@ build website:
image: node:latest
# add 'node_modules' to cache for speeding up builds
cache:
- paths:
+ paths:
- node_modules/ # Node modules and dependencies
script:
- npm install -g hexo-cli # Install Hexo itself
@@ -107,49 +107,49 @@ In case you want to deploy your website via GitHub Action, here are some of the
name: Hexo Blog CI
# master branch on push, auto run
-on:
+on:
push:
branches:
- master
-
+
jobs:
- build-hexo:
- runs-on: ubuntu-latest
-
+ build-hexo:
+ runs-on: ubuntu-latest
+
steps:
# check it to your workflow can access it
# from: https://github.com/actions/checkout
- name: Checkout Repository master branch
- uses: actions/checkout@master
-
- # from: https://github.com/actions/setup-node
- - name: Setup Node.js 10.x
+ uses: actions/checkout@master
+
+ # from: https://github.com/actions/setup-node
+ - name: Setup Node.js 10.x
uses: actions/setup-node@master
with:
node-version: "10.x"
-
+
- name: Setup Hexo Dependencies
run: |
npm install hexo-cli -g
npm install
-
+
- name: Setup Deploy Private Key
env:
HEXO_DEPLOY_PRIVATE_KEY: ${{ secrets.HEXO_DEPLOY_PRIVATE_KEY }}
run: |
mkdir -p ~/.ssh/
- echo "$HEXO_DEPLOY_PRIVATE_KEY" > ~/.ssh/id_rsa
+ echo "$HEXO_DEPLOY_PRIVATE_KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan github.com >> ~/.ssh/known_hosts
-
+
- name: Setup Git Infomation
- run: |
- git config --global user.name '名字'
+ run: |
+ git config --global user.name '名字'
git config --global user.email '邮件'
- - name: Deploy Hexo
+ - name: Deploy Hexo
run: |
hexo clean
- hexo generate
+ hexo generate
hexo deploy
```
@@ -164,7 +164,7 @@ jobs:
steps:
- name: 🚚 Get latest code
uses: actions/checkout@v2
-
+
- name: 📂 Sync files
uses: SamKirkland/FTP-Deploy-Action@4.1.0
with:
@@ -181,65 +181,65 @@ jobs:
name: Hexo Blog CI
# master branch on push, auto run
-on:
+on:
push:
branches:
- master
-
+
jobs:
- build-hexo:
- runs-on: ubuntu-latest
-
+ build-hexo:
+ runs-on: ubuntu-latest
+
steps:
# check it to your workflow can access it
# from: https://github.com/actions/checkout
- name: Checkout Repository master branch
- uses: actions/checkout@master
-
- # from: https://github.com/actions/setup-node
- - name: Setup Node.js 10.x
+ uses: actions/checkout@master
+
+ # from: https://github.com/actions/setup-node
+ - name: Setup Node.js 10.x
uses: actions/setup-node@master
with:
node-version: "10.x"
-
+
- name: Setup Hexo Dependencies
run: |
npm install hexo-cli -g
npm install
-
+
- name: Setup Deploy Private Key
env:
HEXO_DEPLOY_PRIVATE_KEY: ${{ secrets.HEXO_DEPLOY_PRIVATE_KEY }}
run: |
mkdir -p ~/.ssh/
- echo "$HEXO_DEPLOY_PRIVATE_KEY" > ~/.ssh/id_rsa
+ echo "$HEXO_DEPLOY_PRIVATE_KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan github.com >> ~/.ssh/known_hosts
-
+
- name: Setup Git Infomation
- run: |
- git config --global user.name 'Leon Xu'
+ run: |
+ git config --global user.name 'Leon Xu'
git config --global user.email 'dcwinfield362@gmail.com'
- - name: Deploy Hexo
+ - name: Deploy Hexo
run: |
hexo clean
- hexo generate
+ hexo generate
hexo deploy
- name: Upload result from build job
uses: actions/upload-artifact@v2
with:
name: public
path: /public
- deploy-to-website:
- runs-on: ubuntu-latest
-
+ deploy-to-website:
+ runs-on: ubuntu-latest
+
steps:
# check it to your workflow can access it
# from: https://github.com/actions/checkout
- name: Get latest code
uses: actions/checkout@v2
-
- # from: https://github.com/actions/setup-node
+
+ # from: https://github.com/actions/setup-node
- name: Sync files
uses: SamKirkland/FTP-Deploy-Action@4.1.0
with:
@@ -251,18 +251,18 @@ jobs:
```
### Testing our builds before pushing content to the `master` branch
-What if we want to test our builds in another branch before afecting `master`?
+What if we want to test our builds in another branch before afecting `master`?
We'll just need to set a `test` job to do this for us:
```yaml
image: node:latest
cache:
- paths:
- - node_modules/
+ paths:
+ - node_modules/
before_script:
- - npm install -g hexo-cli
- - npm install
+ - npm install -g hexo-cli
+ - npm install
# add a job called 'test'
test:
stage: test
@@ -277,7 +277,7 @@ pages:
- hexo generate
artifacts:
paths:
- - public
+ - public
only:
- master # this job will affect only the 'master' branch
```