All Projects → X1011 → Git Directory Deploy

X1011 / Git Directory Deploy

Licence: other
deploy a directory as a git branch

Programming Languages

shell
77523 projects
bash
514 projects

Projects that are alternatives of or similar to Git Directory Deploy

Github Pages Deploy Action
Automatically deploy your project to GitHub Pages using GitHub Actions. This action can be configured to push your production-ready code into any branch you'd like.
Stars: ✭ 2,507 (+376.62%)
Mutual labels:  github-pages, deployment
Gulp Gh Pages
A gulp 4 plugin to publish contents to Github pages
Stars: ✭ 611 (+16.16%)
Mutual labels:  github-pages, deployment
actions-publish-gh-pages
🍣 A GitHub Action to publish static website using GitHub Pages
Stars: ✭ 12 (-97.72%)
Mutual labels:  github-pages, deployment
Jekyll Github Deploy
Jekyll Site Automated Deployer to GitHub Pages
Stars: ✭ 67 (-87.26%)
Mutual labels:  github-pages, deployment
Ghaction Github Pages
GitHub Action to deploy to GitHub Pages
Stars: ✭ 153 (-70.91%)
Mutual labels:  github-pages, deployment
Ghpages
Deploy arbitrary static assets through GitHub Actions
Stars: ✭ 169 (-67.87%)
Mutual labels:  github-pages, deployment
GitHub-Education-Portfolio
A portfolio made using React and tools from GitHub Student Developer Pack
Stars: ✭ 50 (-90.49%)
Mutual labels:  github-pages, deployment
Reverie
🎨 A ridiculously elegant Jekyll theme.
Stars: ✭ 442 (-15.97%)
Mutual labels:  github-pages
Dbdeployer
DBdeployer is a tool that deploys MySQL database servers easily.
Stars: ✭ 467 (-11.22%)
Mutual labels:  deployment
Mina
Blazing fast application deployment tool.
Stars: ✭ 4,196 (+697.72%)
Mutual labels:  deployment
Rultor
DevOps Team Assistant
Stars: ✭ 428 (-18.63%)
Mutual labels:  deployment
Easy Deploy Bundle
The easiest way to deploy your Symfony applications
Stars: ✭ 446 (-15.21%)
Mutual labels:  deployment
Register
Grab your own sweet-looking '.is-a.dev' subdomain
Stars: ✭ 470 (-10.65%)
Mutual labels:  github-pages
Rundeck
Enable Self-Service Operations: Give specific users access to your existing tools, services, and scripts
Stars: ✭ 4,426 (+741.44%)
Mutual labels:  deployment
S3 Sync Action
🔄 GitHub Action to sync a directory with a remote S3 bucket 🧺
Stars: ✭ 497 (-5.51%)
Mutual labels:  deployment
Butler
🎩 Command-line itch.io helper
Stars: ✭ 433 (-17.68%)
Mutual labels:  deployment
Gradle Tomcat Plugin
Gradle plugin supporting deployment of your web application to an embedded Tomcat web container
Stars: ✭ 516 (-1.9%)
Mutual labels:  deployment
Git Deploy
Php Script for Auto-Pull in server (Using WebHook from GitLab, GitHub and Bitbucket)
Stars: ✭ 495 (-5.89%)
Mutual labels:  deployment
Hacker
Hacker is a Jekyll theme for GitHub Pages
Stars: ✭ 458 (-12.93%)
Mutual labels:  github-pages
Lagrange
A minimalist Jekyll theme for running a personal blog
Stars: ✭ 454 (-13.69%)
Mutual labels:  github-pages

This is a script for deploying generated files to a git branch, such as when building a single-page app using Yeoman and deploying to GitHub Pages. Unlike the git-subtree approach, it does not require the generated files be committed to the source branch. It keeps a linear history on the deploy branch and does not make superfluous commits or deploys when the generated files do not change.

Circle CI

For an example of use, see X1011/verge-mobile-bingo. For development info, see contributing.md.

configuration

Download the script (wget https://github.com/X1011/git-directory-deploy/raw/master/deploy.sh && chmod +x deploy.sh) and edit these variables within it as needed to fit your project:

  • deploy_directory: root of the tree of files to deploy
  • deploy_branch: branch to commit files to and push to origin
  • default_username, default_email: identity to use for git commits if none is set already. Useful for CI servers.
  • repo: repository to deploy to. Must be readable and writable. The default of "origin" will not work on Travis CI, since it uses the read-only git protocol. In that case, it is recommended to store a GitHub token in a secure environment variable and use it in an HTTPS URL like this: repo=https://$[email protected]/user/repo.git Warning: there is currently an issue where the repo URL may be output if an operation fails.

You can also define any of variables using environment variables and configuration files:

  • GIT_DEPLOY_DIR
  • GIT_DEPLOY_BRANCH
  • GIT_DEPLOY_REPO

The script will set these variables in this order of preference:

  1. Defaults set in the script itself.
  2. Environment variables.
  3. .env file in the path where you're running the script.
  4. File specified on the command-line (see the -c option below).

Whatever values set later in this list will override those set earlier.

run

Do this every time you want to deploy, or have your CI server do it.

  1. check out the branch or commit of the source you want to use. The script will use this commit to generate a message when it makes its own commit on the deploy branch.
  2. generate the files in deploy_directory
  3. make sure you have no uncommitted changes in git's index. The script will abort if you do. (It's ok to have uncommitted files in the work tree; the script does not touch the work tree.)
  4. if deploy_directory is a relative path (the default is), make sure you are in the directory you want to resolve against. (For the default, this means you should be in the project's root.)
  5. run ./deploy.sh

options

-h, --help: show the program's help info.

-c, --config-file: specify a file that overrides the script's default configuration, or those values set in .env. The syntax for this file should be normal var=value declarations. This option must come first on the command-line.

-m, --message <message>: specify message to be used for the commit on deploy_branch. By default, the message is the title of the source commit, prepended with 'publish: '.

-n, --no-hash: don't append the hash of the source commit to the commit message on deploy_branch. By default, the hash will be appended in a new paragraph, regardless of whether a message was specified with -m.

-v, --verbose: echo expanded commands as they are executed, using the xtrace option. This can be useful for debugging, as the output will include the values of variables that are being used, such as $commit_title and $deploy_directory. However, the script makes special effort to not output the value of $repo, as it may contain a secret authentication token.

-e, --allow-empty: allow deployment of an empty directory. By default, the script will abort if deploy_directory is empty.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].