Skip to content

fix: fixed non dynamic url #2

fix: fixed non dynamic url

fix: fixed non dynamic url #2

Workflow file for this run

name: Run Playground Script and Deploy to gh-pages
on:
push:
branches:
- trunk
- main
- develop
- wp-now-support
permissions:
contents: write # Ensure the workflow has write permissions
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Run Playground Script
run: ./scripts/playground.sh
- name: Set up Git configuration
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Clone the gh-pages branch
run: |
git clone --single-branch --branch gh-pages https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} gh-pages
cd gh-pages
BRANCH_NAME=${GITHUB_REF_NAME}
if [ -d "$BRANCH_NAME" ]; then
rm -rf "$BRANCH_NAME"
fi
- name: Copy dist to branch directory
run: |
BRANCH_NAME=${GITHUB_REF_NAME}
mv dist gh-pages/$BRANCH_NAME
- name: Commit and push changes
run: |
cd gh-pages
git add .
git commit -m "Deploy to gh-pages branch from ${GITHUB_REF_NAME}"
git push origin gh-pages --force