V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
Tounea
V2EX  ›  程序员

都说点点鼠标就能把 github pages 快速部署到 netlify 是真的?

  •  
  •   Tounea · 2018-11-30 14:32:43 +08:00 · 2730 次点击
    这是一个创建于 2220 天前的主题,其中的信息可能已经有所发展或是发生改变。

    我按照官方文档操作点点鼠标只看到“ Site deploy failed ”,看到网上教程点点鼠标就 OK 了,也不用去配置什么,我也是同样的做法结果还是“ Site deploy failed ”,难道是我点击鼠标的姿势不对?

    8 条回复    2018-11-30 15:06:45 +08:00
    shylockhg
        1
    shylockhg  
       2018-11-30 14:42:33 +08:00
    确实是点点就行
    shylockhg
        2
    shylockhg  
       2018-11-30 14:43:08 +08:00
    如果你是源码部署,应该需要确认编译脚本是否正确
    Tounea
        3
    Tounea  
    OP
       2018-11-30 14:47:04 +08:00
    @shylockhg 其实就是 hexo 生成的静态文件
    Trim21
        4
    Trim21  
       2018-11-30 14:47:59 +08:00 via Android
    的确是点点点就行,直接部署 username.GitHub.io 仓库
    Tounea
        5
    Tounea  
    OP
       2018-11-30 14:57:41 +08:00
    username.github.io 仓库运行的好好的,部署 Netlify 就这样了!
    Deploy log

    2:17:02 PM: Build ready to start
    2:17:03 PM: build-image version: 12783d4d177a66bec5a23ad1097ea7bd02931128
    2:17:04 PM: buildbot version: 5a64b5cb0ce1ed3ba485935522483a4d39e15107
    2:17:04 PM: Fetching cached dependencies
    2:17:04 PM: Failed to fetch cache, continuing with build
    2:17:04 PM: Starting to prepare the repo for build
    2:17:04 PM: No cached dependencies found. Cloning fresh repo
    2:17:04 PM: git clone https://github.com/bikexi/bikexi.github.io
    2:17:06 PM: Preparing Git Reference refs/heads/master
    2:17:07 PM: Starting build script
    2:17:07 PM: Installing dependencies
    2:17:08 PM: Downloading and installing node v8.14.0...
    2:17:08 PM: Downloading https://nodejs.org/dist/v8.14.0/node-v8.14.0-linux-x64.tar.xz...
    2:17:08 PM:
    #
    2:17:08 PM: 1.9%
    2:17:08 PM:
    ##################
    2:17:08 PM: #################### 54.1%
    2:17:08 PM:
    ################################################
    2:17:08 PM: ######################## 100.0%
    2:17:09 PM: Computing checksum with sha256sum
    2:17:09 PM: Checksums matched!
    2:17:11 PM: Now using node v8.14.0 (npm v6.4.1)
    2:17:11 PM: Attempting ruby version 2.3.6, read from environment
    2:17:12 PM: Using ruby version 2.3.6
    2:17:12 PM: Using PHP version 5.6
    2:17:12 PM: Started restoring cached go cache
    2:17:12 PM: Finished restoring cached go cache
    2:17:12 PM: unset GOOS;
    2:17:12 PM: unset GOARCH;
    2:17:12 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.10.linux.amd64';
    2:17:12 PM: export PATH="/opt/buildhome/.gimme/versions/go1.10.linux.amd64/bin:${PATH}";
    2:17:12 PM: go version >&2;
    2:17:12 PM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.10.linux.amd64.env';
    2:17:12 PM: go version go1.10 linux/amd64
    2:17:12 PM: Installing missing commands
    2:17:12 PM: Verify run directory
    2:17:12 PM: Executing user command: hexo generate
    2:17:12 PM: /usr/local/bin/build: line 32: hexo: command not found
    2:17:12 PM: Caching artifacts
    2:17:13 PM: Started saving pip cache
    2:17:13 PM: Finished saving pip cache
    2:17:13 PM: Started saving emacs cask dependencies
    2:17:13 PM: Finished saving emacs cask dependencies
    2:17:13 PM: Started saving maven dependencies
    2:17:13 PM: Finished saving maven dependencies
    2:17:13 PM: Started saving boot dependencies
    2:17:13 PM: Finished saving boot dependencies
    2:17:13 PM: Started saving go dependencies
    2:17:13 PM: Finished saving go dependencies
    2:17:13 PM: Cached node version v8.14.0
    2:17:13 PM: Error running command: Build script returned non-zero exit code: 127
    2:17:13 PM: Failing build: Failed to build site
    2:17:13 PM: failed during stage 'building site': Build script returned non-zero exit code: 127
    2:17:13 PM: Finished processing build request in 9.510742572s
    oott123
        6
    oott123  
       2018-11-30 15:03:06 +08:00
    把 package.json 删掉。

    要么就部署源码,让 hexo 去编译。
    oott123
        7
    oott123  
       2018-11-30 15:03:35 +08:00
    我是指让 netlify 去调 hexo 编译。
    Trim21
        8
    Trim21  
       2018-11-30 15:06:45 +08:00 via Android   ❤️ 1
    部署 username .github. io 仓库的时候 不需要任何 build command,那个命令留空即可。

    @livid 为什么这条回复会被识别为疑似 spamming ?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1293 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 17:56 · PVG 01:56 · LAX 09:56 · JFK 12:56
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.