Skip to content
arrow-up

GitHub Action

Git HTTPS push deploy

v1.1.0 Latest version

Git HTTPS push deploy

arrow-up

Git HTTPS push deploy

Simple HTTPS Git master branch push for e.g. Heroku or Gigalixir deploys

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Git HTTPS push deploy

uses: ilkka/git-https-push-action@v1.1.0

Learn more about this action in ilkka/git-https-push-action

Choose a version

Git HTTPS push deploy action

This GitHub action allows you to have a deploy step that pushes the master branch to an external remote over HTTPS. It is useful for deploying to platforms like Heroku or Gigalixir. You should include the credentials in the remote URL and therefore make sure that you use a secret.

If the username for your Git remote has a "@", remember to replace it with "%40".

Inputs

  • remoteUrl: remote push URL
  • skipHooks: set to true to push with --no-verify (default: false)

Usage

Here's a usage example where a deploy job runs conditionally after a successful build, but only for the master branch:

name: Build and Deploy

on: push

jobs:
  build: ...

  deploy:
    needs: build
    runs-on: ubuntu-latest
    if: github.ref == 'refs/heads/master'
    steps:
      - uses: actions/checkout@v1
        with:
          ref: master # you can use this to get a non-detached head but it's not strictly required
      - uses: ilkka/git-https-push-action@master
        name: Deploy
        with:
          remoteUrl: ${{ secrets.PUSH_REMOTE }}
          skipHooks: false