爱意满满的作品展示区。
pluvet

竟然还有人手动上传来发布网站?我写了个自动部署工具

  •  
  •   pluvet ·
    pluveto · Apr 28, 2021 · 3645 views
    This topic created in 1865 days ago, the information mentioned may be changed or developed.

    刚开始我是直接用 github page,但是有缓存,等半天才更新。后来试了一下 netlify 自动构建,感觉太慢了。

    所以抽空写了这个工具,可以几秒钟完成更新。(之前也有各种用 Node 写的实现,但是还要安装环境。本程序使用 go 开发,所以支持各种操作系统。)

    site-deploy

    一个用于打包发布静态网站的自动部署工具。

    你只需要在服务器上运行本程序,然后在本地 build 之后通过脚本压缩上传(下面给出了一个实现),服务器上的本程序收到后,会自动清空原有的,然后解压覆盖到所要部署的位置。

    适用于:

    • Hugo / Hexo 等生成的博客
    • Vue / Angular 等前端编译的项目

    开源地址和使用方法: https://github.com/pluveto/site-deploy

    您可以给个 star 进行收藏,也许以后会用到的。

    比较简陋,还望包涵!

    11 replies    2021-05-10 07:15:58 +08:00
    Rocketer
        1
    Rocketer  
       Apr 29, 2021 via iPhone
    使用场景有点少啊,真就是纯手动的人才有用,而且还不支持 S3 这样的对象存储( AWS 的前端部分一般发布到 S3 里)
    intmax2147483647
        2
    intmax2147483647  
       Apr 29, 2021
    用 GitHub action 整一个呗,要啥服务器
    xinyana
        3
    xinyana  
       Apr 29, 2021 via Android
    静态站自动部署方案很多,
    这个方案挺新颖,但是属于下下策
    dadachen1997
        4
    dadachen1997  
       Apr 29, 2021
    cloudflare pages,请。
    wdssmq
        5
    wdssmq  
       Apr 29, 2021
    我现在用 action 发文章到 Z-Blog (╯▽╰)
    LeslieLeung
        6
    LeslieLeung  
       Apr 30, 2021 via iPhone
    是挺有意思 但是为什么不 hexo g -d 呢?
    gps949
        7
    gps949  
       Apr 30, 2021
    github action + hexo +github pages 表示很方便啊
    saltbo
        8
    saltbo  
       Apr 30, 2021
    https://github.com/saltbo/uptoc 跟我这个一样吧
    liuidetmks
        9
    liuidetmks  
       Apr 30, 2021
    gitee + azure devops , push 到 gitee 后自动推送到 github ,然后 hexo.应该和你差不多,

    可惜 gitee page 还得手动刷新,好在用 curl 命令勉强能用.
    ragnaroks
        10
    ragnaroks  
       Apr 30, 2021
    静态前端的机器不让装 syncthing 和 ftpd,我还真的每次发布都 sftp 上去的
    jingcoco
        11
    jingcoco  
       May 10, 2021
    我用 python 的 fabric 包感觉也挺简单....
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2513 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 47ms · UTC 15:59 · PVG 23:59 · LAX 08:59 · JFK 11:59
    ♥ Do have faith in what you're doing.