Giter Club home page Giter Club logo

jekyll-build-action's Introduction

jekyll-build-action

Plain in-place Jekyll build action to be used in pipelines with a variety of possible deploy targets.

Usage

This Action literally only invokes a Jekyll build, so your pipeline needs to ensure the Jekyll source is first gathered, and once this action completes you must copy the contents of the destination folder to your intended hosting location.

A typical example would be a GitHub repository with Jekyll source, and publishing the output to an S3 bucket configured for static site hosting.

The pipeline to realize this would look something like the following:

jobs:
  jekyll:
    name: Build and deploy Jekyll site
    runs-on: ubuntu-latest

    steps:
    - name: Checkout
      uses: actions/checkout@v2

    - name: Build
      uses: jerryjvl/jekyll-build-action@v1

    - name: Configure AWS credentials
      uses: aws-actions/configure-aws-credentials@v1
      with:
        aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
        aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
        aws-region: us-east-1

    - name: Sync output to S3
      run: |
        aws s3 sync ./_site/ s3://my-s3-bucket --delete

References

For more technical details on these steps and associated setup, see:

A Note on Security

Please be mindful of the third-party actions you trust with your secrets, credentials and content. Without investigation you should assume a third-party action might exfiltrate your content to some secondary location, or modify contents before they are published.

Futhermore, if you rely on versioning that the publisher of an action can control, the action you think you are running could be changed later without your knowledge.

... Trust but verify!

jekyll-build-action's People

Contributors

jerryjvl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

jekyll-build-action's Issues

Working Directory

How can I set the working directory?

If not supported, consider supporting something like this:

- name: Build
  uses: jerryjvl/jekyll-build-action@v1
  with:
    working-directory: blog

Dependency Installation Fails

Since recent, site builds starts to fail on installing dependencies. The build log generates the following errors:

+ set -e
+ echo 'Starting Jekyll build'
+ chmod -R a+w /github/workspace
+ jekyll build --trace
Starting Jekyll build
Fetching gem metadata from https://rubygems.org/...........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Fetching public_suffix 4.0.5
Errno::EACCES: Permission denied @ rb_file_s_rename -
(/home/jekyll/.gem/ruby/2.7.0/cache/public_suffix-4.0.5.gem,
/usr/gem/cache/public_suffix-4.0.5.gem)
An error occurred while installing public_suffix (4.0.5), and Bundler cannot
continue.
Make sure that `gem install public_suffix -v '4.0.5' --source
'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  jekyll was resolved to 4.0.1, which depends on
    addressable was resolved to 2.7.0, which depends on
      public_suffix

Tested it against two jekyll sites and both give the same Errno:EACCESS error

Github action fails to run

Hi,

I got the below error when I last ran this action. But it worked without any issue before that. Any idea on how to fix it ?

2020-05-15T11:39:56.5878639Z Starting Jekyll build
2020-05-15T11:39:56.6140922Z + jekyll build --trace
2020-05-15T11:40:04.8872934Z Fetching gem metadata from https://rubygems.org/..........
2020-05-15T11:40:04.9410718Z Fetching public_suffix 4.0.1
2020-05-15T11:40:05.0019903Z Errno::EACCES: Permission denied @ rb_file_s_rename -
2020-05-15T11:40:05.0020394Z (/home/jekyll/.gem/ruby/2.7.0/cache/public_suffix-4.0.1.gem,
2020-05-15T11:40:05.0020842Z /usr/gem/cache/public_suffix-4.0.1.gem)
2020-05-15T11:40:05.0021145Z An error occurred while installing public_suffix (4.0.1), and Bundler cannot
2020-05-15T11:40:05.0021378Z continue.
2020-05-15T11:40:05.0021951Z Make sure that `gem install public_suffix -v '4.0.1' --source
2020-05-15T11:40:05.0022365Z 'https://rubygems.org/'` succeeds before bundling.
2020-05-15T11:40:05.0022478Z 
2020-05-15T11:40:05.0027615Z In Gemfile:
2020-05-15T11:40:05.0027829Z   minima was resolved to 2.5.0, which depends on
2020-05-15T11:40:05.0028631Z     jekyll-feed was resolved to 0.12.1, which depends on
2020-05-15T11:40:05.0028809Z       jekyll was resolved to 3.8.5, which depends on
2020-05-15T11:40:05.0028986Z         addressable was resolved to 2.7.0, which depends on
2020-05-15T11:40:05.0029135Z           public_suffix
```

Logging with --verbose

Allowing users to include the --verbose tag will make it easier to pinpoint and debug potential issues during build.

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.