博客
关于我
使用Travis+github+hexo持续部署博客项目
阅读量:124 次
发布时间:2019-02-26

本文共 2121 字,大约阅读时间需要 7 分钟。

GitHub?Hexo ? Travis CI ??????

???? GitHub ???????????

????? GitHub ? Travis CI????????? GitHub ?????????????????????

  • ?? GitHub ????? GitHub?????????????????????????????????????????????????

  • ??????????? GitHub ????????????????? > ??????? > ??????????????????????????????????????????????????

  • ???? Hexo ??????

    Hexo ?????????????????????????????????????

  • ?? Hexo????????????

    npm install -g hexo
  • ??? Hexo ?????????????

    hexo init

    ??????????????? Hexo ?????

  • ????? GitHub???????????? GitHub ??????

    git add .git commit -m "??? Hexo ??"git push origin master:gh-pages

    ???gh-pages ??????? GitHub Pages ??????????????????? master ???

  • ???? Travis CI ????

    Travis CI ????????CI???????????????????? Travis CI ????

  • ?? Travis CI??? Travis CI????Sign in with GitHub???? GitHub ?????

  • ?? GitHub ??????????? GitHub ?????? ellipse???????????????????????????????? master ????

  • ?? GitHub ???? Travis CI ????????????????????????? GitHub ???

  • ?? .travis.yml ?????????????? .travis.yml ??????????

    language: node_jsnode_js: '11'install: npm installscript: hexo gafter_script: echo "??? GitHub Pages"cd publicgit initgit config user.name "????"git config user.email "????"git add .git commit -m "????"git push -u -f "https://${TOKEN}@github.com/${USERNAME}/hexo_blog.git" master:gh-pagesbranches: only: master

    ? ${TOKEN} ????? GitHub ???${USERNAME} ????? GitHub ???

  • ?? Travis CI?? GitHub ??????????? Travis CI ????????????? Travis CI ??????????

  • ???? Hexo ??

    ??????????????? GitHub Pages?????? Hexo ??????????????? _config.yml ??????????

    url: https://yourusername.github.io/hexo_blogroot: /hexo_blog/

    ? yourusername ????? GitHub ????

    ???????

    ???????Travis CI ????????????????? GitHub Pages????????

  • ????????
    git add .git commit -m "????"git push origin master:gh-pages
  • Travis CI ???Travis CI ?????????? Hexo ????????????? GitHub Pages?
  • ????????

    ?????????? GitHub ??????? > ??????????????????????????https://<yourusername>.github.io/hexo_blog/

    ????

    • ???????? GitHub ????????????????????????????????
    • ????????????? npm??????Travis CI ???????????????
    • ???????????????? .travis.yml ????????????????????????

    ?????????????????????????????????????????? GitHub Pages?

    转载地址:http://zevf.baihongyu.com/

    你可能感兴趣的文章
    pytorch中让数组显示更多的数字 torch.set_printoptions参数详解 numpy也是这个函数
    查看>>
    pringBoot Controller接收参数的几种常用方式
    查看>>
    printf()函数
    查看>>
    PyTorch中的自定义权重初始化
    查看>>
    printf格式字符串和输出列表个数及类型不匹配案例
    查看>>
    printf的格式控制字符串
    查看>>
    PrintStream概述
    查看>>
    Prismix:Prisma 架构混合器,为复杂项目而生
    查看>>
    pritunl服务安装及配置
    查看>>
    Private Destructor
    查看>>
    private和protected能同时修饰成员变量吗_天天用注解你了解注解是怎么实现的吗?...
    查看>>
    privoxy Invalid header received from client.
    查看>>
    Privoxy代码下载
    查看>>
    Probabilistic-Programming-and-Bayesian-Methods-for-Hackers
    查看>>
    pytorch中的求和函数sum(axis=x)解释
    查看>>
    Problem F: 质心算法
    查看>>
    Problem N HDU 2612 Find a way (两次BFS求最值)
    查看>>
    Process /usr/libexec/gdu-notification-daemon was killed by signal 6 (SIGABRT)
    查看>>
    process.env.VUE_APP_BASE_API 获取不到
    查看>>
    Process.run() 和 Process.start() 之间的区别
    查看>>