当前位置: 首页 > 软件库 > Web应用开发 > >

jekyll-deploy-action

授权协议 MIT License
开发语言 JavaScript
所属分类 Web应用开发
软件类型 开源软件
地区 不详
投 递 者 阮星火
操作系统 未知
开源组织
适用人群 未知
 软件概览

jekyll-theme-yat →~ jekyll

�� A GitHub Action to deploy the Jekyll site conveniently for GitHub Pages.


JEKYLL DEPLOY ACTION

Jekyll action for deployment.

Tests Donate (Ko-fi)

Built with ❤︎ by jeffreytse and contributors

Story

As we known, GitHub Pages runs in safe mode and a set of allow-listed plugins. To use the gem in GitHub Pages, you need to build locally or use CI (e.g. travis, github workflow) and deploy to your gh-pages branch.

Therefore, if you want to make Jekyll site run as if it were local, such as letthe custom plugins work properly, this action can be very useful for you,beacause it's really convenient to build and deploy the Jekyll site to GithubPages.

�� Usage

At First, you should add a github workflow file (e.g. .github/workflows/build-jekyll.yml) in your repository's master branch as below:

name: Build and Deploy to Github Pages

on:
  push:
    branches:
      - master  # Here source code branch is `master`, it could be other branch

jobs:
  build_and_deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      # Use GitHub Actions' cache to cache dependencies on servers
      - uses: actions/cache@v2
        with:
          path: vendor/bundle
          key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
          restore-keys: |
            ${{ runner.os }}-gems-

      # Use GitHub Deploy Action to build and deploy to Github
      - uses: jeffreytse/jekyll-deploy-action@v0.3.0
        with:
          provider: 'github'
          token: ${{ secrets.GITHUB_TOKEN }} # It's your Personal Access Token(PAT)
          repository: ''             # Default is current repository
          branch: 'gh-pages'         # Default is gh-pages for github provider
          jekyll_src: './'           # Default is root directory
          jekyll_cfg: '_config.yml'  # Default is _config.yml
          jekyll_baseurl: ''         # Default is according to _config.yml
          bundler_ver: '>=0'         # Default is latest bundler version
          cname: ''                  # Default is to not use a cname
          actor: ''                  # Default is the GITHUB_ACTOR
          pre_build_commands: ''     # Installing additional dependencies (Arch Linux)

To schedule a workflow, you can use the POSIX cron syntax in your workflow file.The shortest interval you can run scheduled workflows is once every 5 minutes.For example, this workflow is triggered every hour.

on:
  schedule:
    - cron:  '0 * * * *'

At the start of each workflow run, GitHub automatically creates a uniqueGITHUB_TOKEN secret to use in your workflow. You can use the GITHUB_TOKENto authenticate in a workflow run. You can use the GITHUB_TOKEN by using thestandard syntax for referencing secrets: ${{ secrets.GITHUB_TOKEN }}. Formore information, you can see here.

If you need a token that requires permissions that aren't available in theGITHUB_TOKEN, you can create a Personal Access Token (PAT), and set it asa secret in your repository for this action to push to the gh-pages branch:

  • Create a Personal Access Token with custom permissions and copy the value.
  • Go to your repository’s Settings and then switch to the Secrets tab.
  • Create a token named GH_TOKEN (important) using the value copied.

In the end, go to your repository’s Settings and scroll down to the GitHub Pagessection, choose the gh-pages branch as your GitHub Pages source.

Additionally, if you don't have the gh-pages branch, you can create it as below:

git checkout --orphan gh-pages
git rm -rf .
git commit --allow-empty -m "initial commit"
git push origin gh-pages

�� Tip: The gh-pages branch is only for the site static files and the master branch is for source code.

�� Credits

  • Jekyll - A blog-aware static site generator in Ruby.
  • actions/checkout - Action for checking out a repo.
  • actions/cache - Cache dependencies and build outputs in GitHub Actions.

✍️ Contributing

Issues and Pull Requests are greatly appreciated. If you've never contributed to an open source project before I'm more than happy to walk you through how to create a pull request.

You can start by opening an issue describing the problem that you're looking to resolve and we'll go from there.

�� License

This software is licensed under the MIT license © JeffreyTse.

  • 使用github actions自动deploy hugo博客。甚至都不用本地安装主题。 jekyll博客 之前使用jekyll,因为github对jekyll集成好。可以直接写markdown,主题可以使用remote theme,这样就只有纯的markdown,十分简洁。不需要跟html混在一起。 用了一段时间jekyll,使用的主题总感觉不满意。换了几个主题,还是感觉不符合。再者有些主题不兼

 相关资料
  • If you use some plugins with your Jekyll blog, chances are you can nothave your blog generated by GitHub Pages.First of all, because they do not allowcustom plugins.This is where jekyll-github-deploy

  • This action has been updated from the first beta version of GH Actions to the new beta version of GH Actions. See below for the new structure required in your workflow. A GitHub Action for Custom Jeky

  • This section focuses on deploying real-world models. It contains the following documents: @{$distributed$Distributed TensorFlow}, which explains how to create a cluster of TensorFlow servers. @{$tfser

  • 该系统主要用于PHP代码的发布和回滚,主要业务对象为项目和机器。项目关联服务器,针对项目进行版本发布,针对Git仓库的TAG进行回滚,目前仅支持全量发布和回滚, 不支持单文件的发布。 该系统可部署在单独的服务器上,但消息worker端必须与Git仓库部署在一起 使用的python扩展如下: angularjs tornado oslo.config sqlalchemy python-mysql

  • Apache::Deploy 是一个 (R)?ex 的模块,用来快速发布网站到 Apache 和 WAR 文件到 Tomcat. 简化了多服务器应用的发布过程。 一段发布应用到 Tomcat 的脚本: use Rex::Apache::Deploy Tomcat;# Version of the applicationmy $VERSION = "1.0";user "deploy";public

  • go-deploy web集群一键上线工具,支持SVN、Git。增量更新、回滚,100+服务器节点秒级完成部署。 Screenshot 特性 支持svn和git 支持多项目、多节点、多环境、分布式集群环境批量更新和回滚操作 golang的高性能并发加持,上百台节点秒级完成部署 无需svn或git账号密码、无需免密登录目标机 降低安全风险 增量更新、回滚,速度更快 server和client采用tc