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.
Required
You must use a privileged access token for that Repository.
The access token can be generated here.
Required
Enter the path of the file to deploy in the repository where you run the workflow.
Ex) dist/*
Required
Enter the name of the repository to be deployed.
Ex) selenehyun/test
Did you read this?
Required Enter the branch name of the repository to be deployed.
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