App deploy and lint cache. #9
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: Verify Coding Standards | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| - dev | |
| jobs: | |
| web-deploy: | |
| name: 🎉 Verify Coding Standards | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 🚚 Get latest code | |
| uses: actions/checkout@v3 | |
| - name: ACF Auth | |
| run: | | |
| cp sample-auth.json auth.json | |
| sed -i 's|"ENTER YOUR LICENSE KEY"|"${{ secrets.ACF_AUTH }}"|g' auth.json | |
| sed -i 's|"ENTER YOUR WEBSITE URL"|"${{ vars.SITE_URL }}"|g' auth.json | |
| cat auth.json | |
| - name: Cache Vendor | |
| id: app-lint-cache-vendor | |
| uses: actions/cache@v3 | |
| env: | |
| cache-name: app-lint-cache-vendor | |
| with: | |
| path: vendor | |
| key: app-vendor-${{ runner.os }}-${{ hashFiles('composer.lock') }} | |
| restore-keys: | | |
| app-lint-cache-vendor-${{ runner.os }}- | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Cache Node Modules | |
| id: app-lint-cache-node_modules | |
| uses: actions/cache@v3 | |
| env: | |
| cache-name: app-lint-cache-node_modules | |
| with: | |
| path: node_modules | |
| key: app-lint-cache-node_modules-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }} | |
| restore-keys: | | |
| app-lint-cache-node_modules-${{ runner.os }}- | |
| - name: Composer Install | |
| run: composer install | |
| if: steps.app-lint-cache-vendor.outputs.cache-hit != 'true' | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - name: nvm use ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'pnpm' | |
| - name: pnpm install | |
| run: pnpm install | |
| if: steps.app-lint-cache-node_modules.outputs.cache-hit != 'true' | |
| - name: lint | |
| run: pnpm lint |