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

    你可能感兴趣的文章
    springCloud整合RabbitMQ实现消息中间件
    查看>>
    pdo sqlserver
    查看>>
    SpringCloud实战(十一)-更优的分布式配置解决方案(Apollo)
    查看>>
    PDO中捕获SQL语句中的错误
    查看>>
    SCP和SFTP相同点和区别
    查看>>
    SpringCloudAlibaba中使用Sentinel实现熔断降级之熔断策略详解
    查看>>
    peek和pop的区别
    查看>>
    Pelemay 项目教程
    查看>>
    Penetration Testing、Security Testing、Automation Testing
    查看>>
    Pentaho业务分析平台 SQL注入漏洞复现
    查看>>
    PentestGPT:一款由ChatGPT驱动的强大渗透测试工具
    查看>>
    PeopleTools 8.54 first install note
    查看>>
    PEP 8016 获胜,成为新的 Python 社区治理方案
    查看>>
    PEP8规范
    查看>>
    PEPM Cookie 远程代码执行漏洞复现(XVE-2024-16919)
    查看>>
    Percona Server 5.6 安装TokuDB
    查看>>
    SpringBoot(十四)整合MyBatis
    查看>>
    percona-xtrabackup 备份
    查看>>