Giter Site home page Giter Site logo

yurikoval / jekyll-deploy-gh-pages Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bryanschuetz/jekyll-deploy-gh-pages

0.0 2.0 5.0 32 KB

A GitHub Action for building a Jekyll site (with custom plugins) and deploying it back to your gh-pages branch.

Dockerfile 47.47% Shell 52.53%

jekyll-deploy-gh-pages's Introduction

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 Jekyll Builds on GitHub Pages

A GitHub Action for building and deploying a Jekyll repo back to its gh-pages branch.

Why not just let GitHub Pages build it? Becaues this way we can use our own custom Jekyll plugins and build scripts.

Secrets

  • GITHUB_TOKEN: Access key scoped to the repository, we need this to push the site files back to the repo. (specify in workflow)

Environment Variables

  • GITHUB_ACTOR: Username of repo owner or object intiating the action (GitHub Provides)
  • GITHUB_REPO: Owner/Repository (GitHub Provides)

Example

name: Jekyll Deploy

on: [push]

jobs: 
  build_and_deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - name: Build & Deploy to GitHub Pages
        env: 
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          GITHUB_REPOSITORY: ${{ secrets.GITHUB_REPOSITORY }}
          GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
        uses: BryanSchuetz/jekyll-deploy-gh-pages@master

Clones the repo, builds the site, and commits it back to the gh-pages branch of the repository. That's it. Just add the above example to a main.yml file in the .github/workflows directory of your repository—see caveats below.

Caveats

  • This uses the v2 of the Actions beta—note the Yaml based workflow syntax—you must have access to the beta release of actions.
  • GITHUB_TOKEN, privileges are still being sorted out by the Actions/GH-Pages team. Changes pushed to your GH-pages branch will only be picked up by the Github Pages server if your workflow is in a private repository.
  • Needs a .gemfile
  • destination: should be set to ./build in your _config.yml file—as God demands.
  • Be sure that any custom gems needed are included in your Gemfile.

jekyll-deploy-gh-pages's People

Contributors

bryanschuetz avatar edricchan03 avatar yurikoval avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.