forked from rcore-os/blog
-
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.
1. 更新软件的版本,对已弃用的配置选项进行了修改 2. 取消与密钥相关的设置,因为在当前仓库上发布网页无需使用它们
- Loading branch information
Showing
3 changed files
with
47 additions
and
67 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 |
---|---|---|
|
@@ -6,49 +6,31 @@ on: | |
pull_request: | ||
branches: [ master ] | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
build-and-deploy: | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: '12' | ||
- run: npm install | ||
- uses: actions/checkout@v3 | ||
|
||
- name: check node.version | ||
run: node --version | ||
- name: check npm.version | ||
run: npm --version | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
|
||
- name: prepare build env | ||
env: | ||
GH_ACTION_DEPLOY_KEY: ${{secrets.GH_ACTION_DEPLOY_KEY}} | ||
NEXT_VERSION: v7.3.0 | ||
- name: build | ||
run: | | ||
mkdir -p ~/.ssh/ | ||
echo "$GH_ACTION_DEPLOY_KEY" | tr -d '\r' > ~/.ssh/id_rsa | ||
chmod 600 ~/.ssh/id_rsa | ||
ssh-keyscan github.com >> ~/.ssh/known_hosts | ||
git config --global user.name 'wyfcyx' | ||
git config --global user.email '[email protected]' | ||
node --version | ||
npm --version | ||
npm i -g hexo-cli | ||
npm i | ||
hexo --version | ||
- name: deploy to github | ||
run: | | ||
pwd | ||
ls | ||
npm install hexo --save | ||
hexo --version | ||
npm install hexo-deployer-git --save | ||
npm install https://github.com/CodeFalling/hexo-asset-image -- save | ||
\cp tools/index.js node_modules/hexo-asset-image/index.js | ||
npm un hexo-renderer-marked --save | ||
# npm i hexo-renderer-pandoc --save | ||
npm i hexo-renderer-kramed --save | ||
hexo clean | ||
hexo generate | ||
hexo deploy | ||
- name: deploy | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
folder: public |
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 |
---|---|---|
|
@@ -76,8 +76,8 @@ meta_generator: true | |
## http://momentjs.com/docs/#/displaying/format/ | ||
date_format: YYYY-MM-DD | ||
time_format: HH:mm:ss | ||
## Use post's date for updated date unless set in front-matter | ||
use_date_for_updated: false | ||
## updated_option supports 'mtime', 'date', 'empty' | ||
updated_option: 'date' | ||
|
||
# Pagination | ||
## Set per_page to 0 to disable pagination | ||
|
@@ -98,6 +98,4 @@ theme: next | |
# Deployment | ||
## Docs: https://hexo.io/docs/deployment.html | ||
deploy: | ||
type: git | ||
repo: [email protected]:rcore-os/blog.git | ||
branch: gh-pages | ||
type: '' |
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,28 +1,28 @@ | ||
{ | ||
"name": "hexo-site", | ||
"version": "0.0.0", | ||
"private": true, | ||
"scripts": { | ||
"build": "hexo generate", | ||
"clean": "hexo clean", | ||
"deploy": "hexo deploy", | ||
"server": "hexo server" | ||
}, | ||
"hexo": { | ||
"version": "4.2.1" | ||
}, | ||
"dependencies": { | ||
"hexo": "^4.2.1", | ||
"hexo-asset-image": "^1.0.0", | ||
"hexo-cli": "^3.1.0", | ||
"hexo-deployer-git": "^2.1.0", | ||
"hexo-generator-archive": "^1.0.0", | ||
"hexo-generator-category": "^1.0.0", | ||
"hexo-generator-index": "^1.0.0", | ||
"hexo-generator-tag": "^1.0.0", | ||
"hexo-renderer-ejs": "^1.0.0", | ||
"hexo-renderer-marked": "^2.0.0", | ||
"hexo-renderer-stylus": "^1.1.0", | ||
"hexo-server": "^1.0.0" | ||
} | ||
} | ||
"name": "hexo-site", | ||
"version": "0.0.0", | ||
"private": true, | ||
"scripts": { | ||
"build": "hexo generate", | ||
"clean": "hexo clean", | ||
"deploy": "hexo deploy", | ||
"server": "hexo server" | ||
}, | ||
"hexo": { | ||
"version": "4.2.1" | ||
}, | ||
"dependencies": { | ||
"hexo": "^4.2.1", | ||
"hexo-asset-image": "^1.0.0", | ||
"hexo-cli": "^3.1.0", | ||
"hexo-deployer-git": "^2.1.0", | ||
"hexo-generator-archive": "^1.0.0", | ||
"hexo-generator-category": "^1.0.0", | ||
"hexo-generator-index": "^1.0.0", | ||
"hexo-generator-tag": "^1.0.0", | ||
"hexo-renderer-ejs": "^1.0.0", | ||
"hexo-renderer-marked": "^2.0.0", | ||
"hexo-renderer-stylus": "^1.1.0", | ||
"hexo-server": "^1.0.0" | ||
} | ||
} |