Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
git-commit

GitHub Action

Git Commit and Push

v2.0

Git Commit and Push

git-commit

Git Commit and Push

Commits any changed files and pushes the result back to origin branch

Installation

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

              

- name: Git Commit and Push

uses: github-actions-x/[email protected]

Learn more about this action in github-actions-x/commit

Choose a version

commit

Git commit and push

Example

name: publish

on:
  push:
    branches:
    - master
    
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - name: checkout
      uses: actions/checkout@master
      with:
        ref: master
    - name: build
      uses: github-actions-x/hugo@master
    - name: push
      uses: github-actions-x/commit@v2
      with:
        github-token: ${{ secrets.GITHUB_TOKEN }}
        push-branch: 'master'
        commit-message: 'publish'
        force-add: 'true'