Skip to content

Workflow file for this run

name: Create Pull Request from master to gh-pages
on:
push:
branches:
- master
schedule:
- cron: '0 0 * * 0' # This runs the workflow every Sunday at midnight UTC
workflow_dispatch: # Allows the workflow to be triggered manually
jobs:
create-pull-request:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Git
run: |
git config --global user.name "github-actions"
git config --global user.email "[email protected]"
- name: Install GitHub CLI
run: |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key C99B11DEB97541F0
sudo apt-add-repository https://cli.github.com/packages
sudo apt update
sudo apt install gh
- name: Authenticate GitHub CLI
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token
- name: Create Pull Request
run: |
gh pr create --base gh-pages --head master --title "Automated Pull Request from master to gh-pages" --body "This pull request was automatically created from master to gh-pages."