Update wiki #7
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 Wiki | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| push: | |
| branches: [ "main" ] | |
| permissions: | |
| contents: write | |
| id-token: write | |
| jobs: | |
| wiki: | |
| name: Update Wiki | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| token: '${{ github.token }}' | |
| submodules: recursive | |
| - name: Get Composer Cache Directory | |
| id: composer-cache | |
| run: | | |
| echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
| - name: Cache Composer dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ steps.composer-cache.outputs.dir }} | |
| key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-composer- | |
| - name: Install dependencies | |
| uses: php-actions/composer@v6 | |
| env: | |
| COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ github.token }}"} }' | |
| with: | |
| php_version: '8.4' | |
| - name: Create Docs Markdown | |
| uses: php-actions/composer@v6 | |
| with: | |
| php_version: '8.4' | |
| command: 'docs' | |
| - name: Update submodules | |
| id: update | |
| run: git submodule update --remote --recursive | |
| - name: Run git status | |
| id: status | |
| run: echo "::set-output name=status::$(git status -s)" | |
| - name: Add and commit files | |
| if: ${{ steps.status.outputs.status }} | |
| run: | | |
| git add . | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| git config --global user.name "github-actions[bot]" | |
| git commit -m "Update submodules at $(date "+DATE: %Y-%m-%d TIME: %H:%M:%S")" | |
| - name: Push changes | |
| if: ${{ steps.status.outputs.status && github.event_name == 'push' }} | |
| uses: ad-m/github-push-action@master | |
| with: | |
| github_token: ${{ github.token }} | |
| branch: dev | |
| - name: Git Submodule Update | |
| run: | | |
| git pull --recurse-submodules | |
| git submodule update --init --recursive | |
| git submodule update --recursive --remote |