-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
52 additions
and
46 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 |
---|---|---|
|
@@ -12,14 +12,14 @@ jobs: | |
persist-credentials: false | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node.js 20.x | ||
- name: Setup Node.js 22.x | ||
uses: actions/setup-node@main | ||
with: | ||
node-version: 20 | ||
node-version: 22 | ||
registry-url: https://registry.npmjs.org | ||
|
||
|
||
- name: 设置Hexo环境 | ||
- name: 设置 Hexo 环境 | ||
env: | ||
ACTION_DEPLOY_KEY: ${{ secrets.ACTION_DEPLOY_KEY }} | ||
run: | | ||
|
@@ -42,7 +42,7 @@ jobs: | |
echo "$GOOGLE_TOKEN" | tr -d '\r' >> $GITHUB_WORKSPACE/push.json | ||
hexo generate && gulp && hexo deploy | ||
# - name: 部署到Cloudflare Workers | ||
# - name: 部署到 Cloudflare Workers | ||
# uses: cloudflare/[email protected] | ||
# with: | ||
# apiToken: ${{ secrets.CF_WORKERS_TOKEN }} |
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 |
---|---|---|
|
@@ -123,6 +123,30 @@ hexo_submit_urls_to_search_engine: | |
# find_what: sciadv.top | ||
# replace_with: lib.sci-adv.cc | ||
|
||
url_submission: | ||
enable: true | ||
type: 'all' # latest or all( latest: modified pages; all: posts & pages) | ||
channels: # included channels are `baidu`, `google`, `bing`, `shenma` | ||
baidu: | ||
token: "$BAIDU_TOKEN" # Baidu Private Token | ||
count: 10 # Optional | ||
bing: | ||
token: "$BING_TOKEN" # Bing Access Token | ||
count: 10 # Optional | ||
google: | ||
key: "push.json" # Google key path (e.g. `google_key.json` or `data/google_key.json`) | ||
count: 10 # Optional | ||
shenma: | ||
count: 10 # Optional | ||
user: "" # Username used when registering | ||
token: "" # ShenMa Private Key | ||
prefix: ['/archives', '/categories', '/tags'] # URL prefix | ||
#ignore: ["/post/a*", "/post/a?c"] # URL addresses that do not need to be submitted (wildcards are supported) | ||
count: 50 # Submit limit | ||
urls_path: 'submit_url.txt' # URL list file path | ||
sitemap: 'https://lib.sci-adv.cc/sitemap.xml' # Sitemap path(e.g. the url is like this https://abnerwei.com/baidusitemap.xml, you can fill in `baidusitemap.xml`) | ||
|
||
|
||
import: | ||
head_begin: | ||
- <link rel="manifest" href="/manifest.json"> | ||
|
@@ -171,6 +195,4 @@ deploy: | |
repository: | ||
github: [email protected]:MCSeekeri/sciadv-site | ||
branch: master | ||
- type: cjh_bing_url_submitter | ||
- type: cjh_baidu_url_submitter | ||
- type: cjh_google_url_submitter | ||
- type: url_submission |
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,45 +1,31 @@ | ||
var gulp = require('gulp'); | ||
var minifycss = require('gulp-minify-css'); | ||
var htmlmin = require('gulp-html-minifier-terser'); | ||
var htmlclean = require('gulp-htmlclean'); | ||
var terser = require('gulp-terser'); | ||
const gulp = require('gulp'); | ||
const cleanCSS = require('gulp-clean-css'); | ||
const htmlmin = require('gulp-htmlmin'); | ||
const terser = require('gulp-terser'); | ||
|
||
// 压缩css文件 | ||
const minify_css = () => ( | ||
gulp.src(['./public/**/*.css']) | ||
.pipe(minifycss()) | ||
.pipe(gulp.dest('./public')) | ||
); | ||
gulp.task('minify_css', () => { | ||
return gulp.src('./public/**/*.css') | ||
.pipe(cleanCSS({compatibility: 'ie8'})) | ||
.pipe(gulp.dest('./public')); | ||
}); | ||
|
||
// 压缩html文件 | ||
const minify_html = () => ( | ||
gulp.src(['./public/**/*.html','!./public/{lib,lib/**}']) | ||
.pipe(htmlclean()) | ||
gulp.task('minify_html', function() { | ||
return gulp.src(['./public/**/*.html', '!./public/{lib,lib/**}']) | ||
.pipe(htmlmin({ | ||
collapseWhitespace: true, | ||
removeComments: true, | ||
minifyJS: true, | ||
minifyCSS: true, | ||
minifyURLs: true, | ||
})) | ||
.pipe(gulp.dest('./public')) | ||
) | ||
.pipe(gulp.dest('./public')); | ||
}); | ||
|
||
// 压缩js文件 | ||
const minify_js = () => ( | ||
gulp.src(['./public/**/*.js', '!./public/**/*.min.js','!./public/{lib,lib/**}']) | ||
gulp.task('minify_js', function() { | ||
return gulp.src(['./public/**/*.js', '!./public/**/*.min.js', '!./public/{lib,lib/**}']) | ||
.pipe(terser()) | ||
.pipe(gulp.dest('./public')) | ||
) | ||
.pipe(gulp.dest('./public')); | ||
}); | ||
|
||
module.exports = { | ||
minify_html: minify_html, | ||
minify_css: minify_css, | ||
minify_js: minify_js | ||
}; | ||
gulp.task('one', gulp.parallel( | ||
minify_html, | ||
minify_css, | ||
minify_js | ||
)) | ||
|
||
gulp.task('default', gulp.series('one')); | ||
gulp.task('one', gulp.parallel('minify_html', 'minify_css', 'minify_js')); | ||
gulp.task('default', gulp.series('one')); |
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
4a4336a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
sciadv – ./
sg.vercel.app
sciadv-mcseekeris-projects.vercel.app
steinsgate.vercel.app
sciadv.vercel.app
sciadv-git-main-mcseekeris-projects.vercel.app
sciadv.mcseekeri.top