Update App Shell docs #8
This file contains hidden or 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: 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 | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| env: | |
| APP_SHELL_REF: main | |
| steps: | |
| - name: Checkout current repository | |
| uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 | |
| with: | |
| path: docs | |
| - name: Checkout app-shell repository | |
| uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 | |
| with: | |
| repository: tailor-platform/app-shell | |
| ref: ${{ env.APP_SHELL_REF }} | |
| path: app-shell | |
| - name: Set up Node.js | |
| uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.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: Create Pull Request | |
| if: steps.git_diff.outputs.changed == 'true' | |
| uses: peter-evans/create-pull-request@22a9089034f40e5a961c8808d113e2c98fb63676 # v7.0.11 | |
| with: | |
| path: docs | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| commit-message: Update App Shell pages | |
| branch: update-app-shell-pages | |
| title: Update App Shell pages | |
| body: Auto-created by the update_app_shell_docs workflow. | |
| base: main | |
| labels: DOCS |