headless_docs_generated #157
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: Create New CodeSandBoxDemo | |
on: | |
repository_dispatch: | |
types: [headless_docs_generated] | |
jobs: | |
create-new-demo: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Ruby in runner | |
uses: ruby/setup-ruby@ee26e27437bde475b19a6bf8cb73c9fa658876a2 | |
with: | |
ruby-version: '3.1.2' | |
- name: Make a new Branch for version | |
uses: peterjgrainger/action-create-branch@b48b0ca0e307c9b56f059b70274984ffeaa90a43 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
branch: "version-${{ github.event.client_payload.headless_version }}" | |
- name: Checkout new branch | |
uses: actions/checkout@v3 | |
with: | |
ref: version-${{ github.event.client_payload.headless_version }} | |
- name: Run script to update package.json on new branch | |
run: | | |
cd .github/scripts | |
ruby update_package.rb ${{ github.event.client_payload.headless_version }} | |
cd ../.. | |
git config user.name ${{ secrets.AUTHOR }} | |
git config user.email ${{ secrets.AUTHOR_EMAIL }} | |
git status | |
git add package.json | |
git commit -m "update package to version ${{ github.event.client_payload.headless_version }}" | |
git push | |