Skip to content

build_dev_preview

build_dev_preview #488

name : build_dev_preview
on:
schedule:
- cron: '0 8 * * *'
jobs:
build-dev-preview:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: master
- uses: actions/setup-node@v3
with:
node-version: '18.x'
- name: Build Dev Preview List
run : |
npm install get-all-files
npm install node-fetch
git config user.email "[email protected]"
git config user.name "Adam Friedmann"
git checkout -b menu-editor-sync
node scripts/buildDevPreviewList.mjs
git add guides/developer-preview.md
DIFF=$(git status --porcelain)
if [[ "$DIFF" == *"developer-preview.md"* ]]; then
git commit -m "New dev preview list - menu editor change"
git push --set-upstream origin menu-editor-sync --force
echo "changes_pushed=yes" >> $GITHUB_ENV
echo "branch_name=menu-editor-sync" >> $GITHUB_ENV
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: slackapi/[email protected]
if: ${{ env.changes_pushed == 'yes' }}
with:
payload: |
{
"branch_name" : "${{ env.branch_name }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}