Update ci.yml #12
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: Changed Data Files - Develop | |
on: | |
push: | |
branches: | |
- develop | |
paths: | |
- '.github/workflows/**' | |
- 'src/_data/**.js' | |
- 'src/_data/**.yml' | |
- 'src/pages/api/**.njk' | |
- 'src/_includes/modules/api-config.njk' | |
jobs: | |
create_pr: | |
runs-on: ubuntu-latest | |
name: Create PR | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: api/dev | |
- name: Reset develop branch | |
run: | | |
git fetch origin develop:develop | |
git reset --hard develop | |
- name: set datestamp | |
id: datestamp | |
run: | | |
echo "datestamp=$(date --rfc-3339=date)" >> $GITHUB_OUTPUT | |
- name: Set PR message | |
id: message | |
run: | | |
title="[Auto PR]: ${{ steps.datestamp.outputs.datestamp }} Update API - Dev" | |
body="This PR was auto-generated on ${{ steps.datestamp.outputs.datestamp }} \ | |
by [create-pull-request](https://github.com/peter-evans/create-pull-request)." | |
echo "title=$title" >> $GITHUB_OUTPUT | |
echo "body=$body" >> $GITHUB_OUTPUT | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
branch: auto/api/dev | |
title: ${{ steps.message.outputs.title }} | |
body: ${{ steps.message.outputs.body }} |