Sync Documentation #19
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: 'Sync Documentation' | |
| on: | |
| workflow_dispatch: | |
| # Run weekly on Saturdays at 10 AM UTC (weekend schedule) | |
| schedule: | |
| - cron: '0 10 * * 6' | |
| jobs: | |
| auto-build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| env: | |
| APP_ENV: production | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 18 | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build preparation | |
| env: | |
| APP_ENV: production | |
| AMP_DOC_TOKEN: ${{ secrets.AMP_DOC_TOKEN }} | |
| run: | | |
| npx gulp buildPrepare | |
| - name: Create Pull Request if changes exist | |
| uses: peter-evans/create-pull-request@v5 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| commit-message: 'Automatic documentation sync [skip ci]' | |
| title: 'Automatic documentation sync - Run ${{ github.run_number }}' | |
| body: | | |
| 🤖 **Automatic documentation sync** | |
| This PR contains updates generated by the weekly automated build process. | |
| **Schedule:** Every Saturday at 10 AM UTC | |
| **Workflow Run:** [${{ github.run_number }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) | |
| Please review the changes. | |
| branch: auto-build-${{ github.run_number }} | |
| delete-branch: true |