headless_docs_generated #204
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' | |
env: | |
ImageOS: ubuntu22 | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Make a new Branch for version | |
run: | | |
git checkout -b "version-${{ github.event.client_payload.headless_version }}" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- 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 --set-upstream origin "version-${{ github.event.client_payload.headless_version }}" |