GithubHelp home page GithubHelp logo

jjediny / static-publisher Goto Github PK

View Code? Open in Web Editor NEW

This project forked from static-publisher/static-publisher

0.0 2.0 0.0 295 KB

Automated deployment server for static site generators

License: MIT License

Ruby 8.34% CSS 0.25% JavaScript 90.71% HTML 0.70%

static-publisher's Introduction

Static Publisher

Build Status

Static Publisher is an automated deployment server for static site generators, such as Jekyll. It provides endpoints that can be called by webhooks from git hosting sites such as GitHub or BitBucket everytime a project is updated. It has an easy to use admin panel for managing multiple projects deployment, it can run plugins without security restrictions and it can publish to an S3 bucket or git repository.

Installation

The easiest way to deploy is to use this "deploy to heroku" button:

Deploy

For other platforms, Static Publisher is a sinatra app, so instructions for deploying a sinatra app on your chosen platform should work. It also requires a mongodb database, with the environment variable MONGODB_URI set to the database's url.

Usage

Once deployed, the admin panel can be found at: https://your-fancy-domain.com/admin

Static Publisher

Admin Credentials

The inital username and password are set to admin and admin respectively.

To change the username and password, click the small user icon in the top right corner. Type your new credentials in the small form for that appears, click the "Change" submit button and log back in again.

Endpoint

Each generate-publish sequence is triggered by an endpoint, a URL that responds to a HTTP POST request, to be used as a callback for a webhook. The content of the request is completely ignored to avoid relying on any specific webhook's format.

Static Publisher will still return a 200 status indiscriminately, even if a no matching endpoint is found or an error occurs during the generate-publish sequence. Therefore, it is wise to test that an endpoint is working by either checking that it has published successfully or by consulting the STDOUT logs.

Route

The path for the endpoint. It must always start with a preceeding forward slash. For example, a route of /update-my-awesome-jekyll will make the URL https://your-fancy-domain.com/update-my-awesome-jekyll trigger the generate-publish sequence.

The following routes cannot be used as they are used for the admin panel: /user or /config

Source

The location and branch of the git repository for the project you wish to publish.

Generator

Currently, the follow static site generators are supported:

Destination

These are the methods of publishing that are currently supported:

Click on any of the subsection's labels to reveal their fields. If all the relevent fields are filled in, then that publish method will be attempted.

S3

To get your access key, follow these instructions.

If the bucket does not exist it will be created.

Git

To publish to a git repository that is password protected use the following form:

https://[username]:[password]@my-repo-host.com/cool-organisation/awesome-project

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

static-publisher's People

Contributors

lirantal avatar mushishi78 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.