Skip to content

selenehyun/gh-push

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Build Push

This is the Action we created to release the result of building the Repository's file into another Repository.
This is useful when managing Sources used for GitHub Pages to another Repository.

I am using it myself, and the build results of the code I write here are deployed here.

Be careful

⚠️ This action clear all files in the repository to be deployed and then deploys only the new changes.

Inputs

GITHUB_TOKEN

Required You must use a privileged access token for that Repository.
The access token can be generated here.

COMMIT_FILES

Required Enter the path of the file to deploy in the repository where you run the workflow.
Ex) dist/*

REPO_FULLNAME

Required Enter the name of the repository to be deployed.
Ex) selenehyun/test

Did you read this?

BRANCH

Required Enter the branch name of the repository to be deployed.

Example usage

name: Publish pages

on:
  push:
    branches:
      - master

jobs:
  build:
    runs-on: ubuntu-latest

    strategy:
      matrix:
        node-version: [12.x]

    steps:
      - uses: actions/checkout@v1
        with:
          fetch-depth: 0
      - name: Use Node.js ${{ matrix.node-version }}
        uses: actions/setup-node@v1
        with:
          node-version: ${{ matrix.node-version }}
      - name: npm install, build
        run: |
          npm ci
          npm run build
        env:
          CI: true
      - name: Publish
        uses: selenehyun/gh-push@master
        env:
          GITHUB_TOKEN: ${{ secrets.PUBLISH_ACCESS_TOKEN }}
          COMMIT_FILES: dist/*
          REPO_FULLNAME: polym-team/polym-team.github.io
          BRANCH: master