Merge pull request #36 from tcouch/main #37
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Jekyllify projects | |
on: | |
push: | |
branches: ["staging"] | |
paths: | |
- '_projects/**' # only run when PR makes changes to _projects folder contents | |
workflow_dispatch: | |
jobs: | |
jekyllify: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code repository | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Run jekyllify script | |
run: python ./_utils/jekyllify.py | |
- name: Commit changes | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: Auto generate Jekyll front matter for projects | |
staging_pr: | |
runs-on: ubuntu-latest | |
needs: jekyllify | |
steps: | |
- name: Checkout code repository | |
uses: actions/checkout@v4 | |
- name: Create PR to main | |
run: gh pr create -t jekyllified/${{ github.ref_name }} -b "Automatically created PR to merge new jekyllified project content" | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |