Git Product home page Git Product logo

gh-pages's Introduction

github_pages

Publish files to a gh-pages branch on GitHub (or any other branch anywhere else). Dart port of the NodeJS gh-pages package.

pub package

Getting Started

Install it globally from the command line.

$ dart pub global activate github_pages

Or add it to your pubspec.yaml file as a dev dependency.

dev_dependencies:
  github_pages: ^2.0.0

Usage

For example, to publish your web application, you must generate a release build and then run the package with the required directory.

$ flutter build web
$ flutter pub run github_pages -d build/web

Calling this script will create a temporary clone of the current repository, create a gh-pages branch if one doesn't already exist, copy over all files from the base path, or only those that match patterns from the optional src configuration, commit all changes, and push to the origin remote.

If a gh-pages branch already exists, it will be updated with all commits from the remote before adding any commits from the provided src files.

Note that any files in the gh-pages branch that are not in the src files will be removed. See the add option if you don't want any of the existing files removed.

Options

The default options work for simple cases. The options described below let you push to alternate branches, customize your commit messages and more.

$ flutter pub run github_pages --help
Usage: github_pages [options]
Options:
-d, --dist          Base directory for all source files
-s, --src           Pattern used to select which files to publish
                    (defaults to "**")
-b, --branch        Name of the branch you are pushing to
                    (defaults to "gh-pages")
-e, --dest          Target directory within the destination branch (relative to the root)
                    (defaults to ".")
-a, --add           Only add, and never remove existing files
-x, --silent        Do not output the repository url
-m, --message       Commit message
                    (defaults to "Updates")
-g, --tag           Add tag to commit
-t, --dotfiles      Include dotfiles
-r, --repo          URL of the repository you are pushing to
-p, --depth         Depth for clone
                    (defaults to "1")
-o, --remote        The name of the remote
                    (defaults to "origin")
-u, --user          The name and email of the user. Format is "Your Name <[email protected]>".
                    (defaults to the git config)
-v, --remove        Remove files that match the given pattern (ignored if used together with --add).
                    (defaults to ".")
-n, --no-push       Commit only (with no push)
-f, --no-history    Push force new commit without parent history
-h, --help          Print usage information

gh-pages's People

Contributors

javoeria avatar

Stargazers

 avatar

Watchers

James Cloos 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.