[FEATURE] Contributing a Step-by-Step Guide Using Your Browser and Gi… #14
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: Prepare for rendering and push to main | |
| on: | |
| push: | |
| branches: | |
| - contrib | |
| workflow_dispatch: | |
| jobs: | |
| prepare-and-push: | |
| if: github.repository_owner == 'TYPO3-documentation' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| ref: contrib | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.3' | |
| - name: Remove 00Incoming folder | |
| run: rm -rf Documentation/00Incoming | |
| - name: Index files | |
| run: php bin/index-files | |
| - name: Expand shorthand links | |
| run: php bin/expand-tags | |
| - name: Generate table of contents | |
| run: php bin/generate-tos | |
| - name: Expand tags | |
| run: php bin/expand-tags | |
| - name: Configure Git | |
| run: | | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| git config --global user.name "github-actions[bot]" | |
| - name: Commit and push changes | |
| run: | | |
| git add . | |
| git commit -m "Pre-render: $(git show -s --format='%s')" | |
| git push origin contrib:main --force | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |