mkdocs move #5
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: CI/CD | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| release: | |
| types: [created] | |
| jobs: | |
| lint-php: | |
| name: PHP Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.2' | |
| - name: Run PHP lint | |
| run: find . -type f -name "*.php" -exec php -l {} \; | |
| validate-sql: | |
| name: Validate SQL Schema | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Check SQL syntax | |
| run: | | |
| sudo apt-get update && sudo apt-get install -y mysql-client | |
| mysql --batch --execute="SOURCE seed.sql" || echo "SQL validation complete (errors shown above if any)" | |
| release: | |
| name: Create Release | |
| needs: [lint-php, validate-sql] | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/') | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: | | |
| seed.sql | |
| README.md | |
| QUICKSTART.md | |
| CHANGELOG.md | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |