Skip to content

Update cd.yml

Update cd.yml #2

Workflow file for this run

name: Create PR with Build
on:
push:
branches:
- develop
jobs:
build-and-create-pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Create PR Branch
run: |
git config --global user.name "github-actions-bot"
git config --global user.email "support+actions@github.com"
# Create a new branch with timestamp to ensure uniqueness
timestamp=$(date +%s)
branch_name="build-update-${timestamp}"
git checkout -b $branch_name
# Add and commit build files
git add build/
git commit -m "Update build files"
git push origin $branch_name
- name: Create Pull Request
uses: repo-sync/pull-request@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
destination_branch: "gh-pages"
pr_title: "Update build files"
pr_body: "Automated PR to update build files"
pr_label: "automated pr"