This action runs build.sh
and pushes the generated content to Git Hub Pages site.
GH_PAGES_BRANCH
(optional): override the default gh-pages
deployment branchSOURCE_FOLDER
(optional): Set path to use as document root content
is the default configuration fileDONOTPUBLISH
(optional): Stop after running the command if variable is anything but emptyCreate a .github/workflow/runpublish.yml
like:
name: Run build.sh and publish to GHPages
on:
push:
branches:
- master
schedule:
- cron: "0 * * * *"
jobs:
runpublish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Use GitHub Actions' cache to shorten build times and decrease load on servers
- uses: actions/[email protected]
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements/*') }}
restore-keys: |
${{ runner.os }}-pip-
- uses: iranzo/[email protected]
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
SOURCE_FOLDER: content
Adjust your build.sh
for additional commands:
#!/bin/bash
mkdir -p output
echo "Whatever" > content/mypage.html
Commit and let the GitHub Actions take care of it!