Skip to content

headless_docs_generated #193

headless_docs_generated

headless_docs_generated #193

name: Create New CodeSandBoxDemo
on:
repository_dispatch:
types: [headless_docs_generated]
jobs:
create-new-demo:
runs-on: [coveo, linux, x64, ec2] # run on self hosted Coveo ec2 machines
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 }}"