博客
关于我
使用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/

    你可能感兴趣的文章
    OA系统选型:选择好的工作流引擎
    查看>>
    OA让企业业务流程管理科学有“据”
    查看>>
    OA项目之会议通知(查询&是否参会&反馈详情)
    查看>>
    Vue.js 学习总结(13)—— Vue3 version 计数介绍
    查看>>
    OA项目之我的会议(会议排座&送审)
    查看>>
    OA项目之我的会议(查询)
    查看>>
    OA项目之我的审批(会议查询&会议签字)
    查看>>
    OA项目之项目简介&会议发布
    查看>>
    ObjC的复制操作
    查看>>
    Object c将一个double值转换为时间格式
    查看>>
    object detection之Win10配置
    查看>>
    object detection训练自己数据
    查看>>
    object detection错误Message type "object_detection.protos.SsdFeatureExtractor" has no field named "bat
    查看>>
    object detection错误之Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR
    查看>>
    object detection错误之no module named nets
    查看>>
    Object of type 'ndarray' is not JSON serializable
    查看>>
    Object Oriented Programming in JavaScript
    查看>>
    object references an unsaved transient instance - save the transient instance before flushing
    查看>>
    Object 类的常见方法有哪些?
    查看>>
    Object-c动态特性
    查看>>