Skip to content

欢迎大家部署镜像网站,网站我将放置在首页 #102

Description

@jaywcjlove

由于中国国内访问,时常打不开,推荐您部署的镜像网站,大家可以在这里留言推荐您的镜像网站网址,我将放置在首页推荐。

第三方国内镜像

由于中国国内访问,时常打不开,你可以访问下面镜像网站。

reference/README.md

Lines 425 to 455 in ad5accd

[quickref.cn](https://quickref.cn)<!--rehype:target=_blank-->
[ecdata.cn](http://ref.ecdata.cn)<!--rehype:target=_blank-->
[aibk.cn](https://quickref.aibk.cn)<!--rehype:target=_blank-->
[jgeek.cn](http://reference.jgeek.cn/)<!--rehype:target=_blank-->
[laoleng.vip](http://bbs.laoleng.vip/reference/)<!--rehype:target=_blank-->
[liujiapeng.com](https://www.liujiapeng.com/)<!--rehype:target=_blank-->
[dbyun.net](https://www.dbyun.net/reference/index.html)<!--rehype:target=_blank-->
[dc6.fun](https://dc6.fun/reference/)<!--rehype:target=_blank-->
[if010.com](https://quickref.if010.com/)<!--rehype:target=_blank-->
[pipecraft.net](https://quickref.pipecraft.net/)<!--rehype:target=_blank&class=contributing&data-info=👆需要梯子-->
[isteed.cc](https://ref.isteed.cc/)<!--rehype:target=_blank-->
[1han.wiki](https://code.1han.wiki/)<!--rehype:target=_blank-->
[linzhe.top](https://linzhe.top/)<!--rehype:target=_blank-->
[xushanxiang.com](https://xushanxiang.com/ref/)<!--rehype:target=_blank-->
[winnerzr01.github.io](https://winnerzr01.github.io/Quick-Reference/index.html)<!--rehype:target=_blank&class=contributing&data-info=👆需要梯子-->
[isteed.cc](https://ref.isteed.cc/)<!--rehype:target=_blank-->
[hestudio.org](https://quickref.hestudio.org)<!--rehype:target=_blank&class=contributing&data-info=👆整点自动同步-->
[surcode.cn](https://ref.surcode.cn)<!--rehype:target=_blank-->
[cms.im](https://quickref.cms.im/)<!--rehype:target=_blank-->
[nuomiphp.com](https://reference.tool.nuomiphp.com/)<!--rehype:target=_blank-->
[eryajf.net](https://ref.eryajf.net/)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
[kjchmc.cn](https://ref.kjchmc.cn/)<!--rehype:target=_blank&class=contributing&data-info=👆实时同步,多线路-->
[likeadmin.cn](https://www.likeadmin.cn/quickref/)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
[qiubit.cc](http://ref.qiubit.cc)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
[aoh.cc](https://aoh.cc/)<!--rehype:target=_blank-->
[reference.code05.com](https://reference.code05.com/)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
[kyoma.top](https://reference.kyoma.top/)<!--rehype:target=_blank&class=contributing&data-info=👆实时同步-->
[quickreference.pages.dev](https://quickreference.pages.dev/)<!--rehype:target=_blank-->
[code05.com](https://reference.code05.com/)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
[xhfun.cn](https://ref.xhfun.cn/)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
<!--rehype:class=home-card home-links-->

快速将镜像网站添加网站首页,只需修改上面 👆 代码推送 PR 即可

快捷部署方法

方法一,只需要克隆 gh-pages 分支代码到你的静态服务就可以了

$ git clone https://github.com/jaywcjlove/reference.git -b gh-pages

你可以使用 gitee 镜像仓库获取最新的代码

$ git clone https://gitee.com/jaywcjlove/reference.git -b gh-pages

方法二,使用 docker 快捷部署 web 版

Docker Image Version (latest by date) Docker Image Size (latest by date) Docker Pulls

$ docker pull wcjiang/reference

$ docker run --name reference --rm -d -p 9667:3000 wcjiang/reference:latest
# Or
$ docker run --name reference -itd -p 9667:3000 wcjiang/reference:latest

方法三,克隆仓库自己编译,添加导航菜单

$ git clone https://github.com/jaywcjlove/reference.git 
$ npm install    # 安装依赖
$ npm run build  # 编译输出静态页面
$ npm run start  # 开发模式,监听实时编译输出静态页面
# 添加环境变量文件,添加环境变量
$ touch .env

文件被输出到 dist 目录,将 dist 目录静态页面部署到静态服务就可以了

image

提供自定义菜单,在项目的根目录建立 .env 文件,添加下面内容

REF_URL=http://ref.xxx.cn/
REF_LABEL=网站首页

页脚添加 (支持 HTML 字符串)

REF_FOOTER=备案号:沪ICP备20220000000号-1

修改版权信息 (支持 HTML 字符串)

LICENSE=Copyright (c) <b>2022</b> 小弟调调™

在项目根目录中创建 .env 文件

利用 Github Actions 定时任务来完成自动更新

在仓库添加 .github/workflows/update-ref.yml 文件 Github Actions 配置,感谢 @eryajf #102 (comment) 提供方法

name: 每8个小时更新一次reference
on:
  schedule:
    - cron: '21 */8 * * *' # 定时任务
  workflow_dispatch:       # 手动运行

env: # 设置环境变量
  TZ: Asia/Shanghai # 时区(设置时区可使页面中的`最近更新时间`使用时区时间)

jobs:
  build: # 自定义名称
    runs-on: ubuntu-latest
    steps:
      - name: 🚜 拉取最新代码
        uses: actions/checkout@v3
        with:
          ref: 'main'
          repository: 'jaywcjlove/reference'

      - name: ♻️ 编译静态文件
        run: |
          echo -e 'REF_URL=https://refs.xxx.net/\nREF_LABEL=网站首页' > .env
          npm install
          npm run build

      - name: 🚁 部署到服务器
        uses: wlixcc/SFTP-Deploy-Action@v1.0
        with:
          username: 'root'   #ssh user name
          port: '22' # 远程服务器ssh端口,默认22
          server: 'prod.refs.xxx.net' # 远程服务器IP
          ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }} # 认证服务器秘钥对的私钥
          local_path: './dist/*'  # 对应我们项目打包后的静态文件路径
          remote_path: '/data/www/refs.xxx.net' # 服务器上的路径
          delete_remote_files: true

感谢🙏

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions