Files
Scott RigbyandGitHub 15ddd21f96 Auto-sync README from main to gh-pages (#41)
* Auto-sync README from main to gh-pages

Signed-off-by: Scott Rigby <scott@r6by.com>

* Only runs on push to main

even if this workflow is copied to a new branch

Signed-off-by: Scott Rigby <scott@r6by.com>
2020-09-05 11:46:45 -04:00

24 lines
588 B
YAML

on:
push:
branches:
- 'main'
paths:
- 'README.md'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: |
cp -f README.md ${{ runner.temp }}/README.md
- uses: actions/checkout@v2
with:
ref: gh-pages
- run: |
cp -f ${{ runner.temp }}/README.md .
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
git add README.md
git commit --signoff -m "Sync README from main"
git push