Skip to content

Update App Shell docs #83

Update App Shell docs

Update App Shell docs #83

name: Update App Shell docs
on:
schedule:
- cron: "0 0 * * *" # Runs at 00:00 UTC every day
workflow_dispatch: # Allows manual triggering
jobs:
update-app-shell-pages:
runs-on: ubuntu-slim
env:
APP_SHELL_REF: main
steps:
- name: Generate app token
id: app-token
uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v2.2.2
with:
app-id: ${{ secrets.TAILOR_DOCS_BOT_APP_ID }}
private-key: ${{ secrets.TAILOR_DOCS_BOT_PRIVATE_KEY }}
- name: Checkout current repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
token: ${{ steps.app-token.outputs.token }}
ref: main
path: docs
- name: Checkout app-shell repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: tailor-platform/app-shell
ref: ${{ env.APP_SHELL_REF }}
path: app-shell
- name: Set up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: "24"
- name: Install dependencies for docs-sync script
working-directory: docs/scripts/docs-sync
run: npm ci
- name: Sync the docs files
working-directory: docs/scripts/docs-sync
run: npm start -- app-shell
- name: Check for changes
working-directory: docs
id: git_diff
run: |
git config --global --add safe.directory $PWD
git add -A
if git diff --staged --quiet; then
echo "changed=false" >> $GITHUB_OUTPUT
else
echo "changed=true" >> $GITHUB_OUTPUT
fi
- name: Commit and push changes
if: steps.git_diff.outputs.changed == 'true'
working-directory: docs
run: |
git config user.name "tailor-docs-bot[bot]"
git config user.email "tailor-docs-bot[bot]@users.noreply.github.com"
git commit -m "Update App Shell pages"
git push origin main