Skip to content

docs: update store docs files (#292) #16

docs: update store docs files (#292)

docs: update store docs files (#292) #16

Workflow file for this run

name: Sync docs
on:
push:
branches:
- '*.x'
paths:
- 'packages/admin/docs/**'
env:
SCREENSHOT_PATH: public/img/screenshots/${{ github.ref_name }}
DOC_REPOSITORY_NAME: laravelshopper.dev
jobs:
docs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Cloning docs repository
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
run: |
git clone --depth=1 https://github.com/shopperlabs/laravelshopper.dev.git
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Create and Copy folders assets
run: |
mkdir -p "./$DOC_REPOSITORY_NAME/$SCREENSHOT_PATH"
cp -Rf packages/admin/docs/content "./$DOC_REPOSITORY_NAME/resources/docs"
cp -Rf packages/admin/docs/screenshots "./$DOC_REPOSITORY_NAME/$SCREENSHOT_PATH"
- name: Commit and Push Changes
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
run: |
cd $DOC_REPOSITORY_NAME
if [ -n "$(git status --porcelain)" ]; then
git add .
git commit -m "docs: update /resources/docs folder with latest changes"
git push origin main
else
echo "No changes to commit."
fi