Merge pull request #647 from correctexam/637-update-to-angular-20 #500
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: Angular GitHub CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| ci: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [22.x] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v1 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Cache node modules | |
| id: cache-nodemodules | |
| uses: actions/cache@v4 | |
| env: | |
| cache-name: cache-node-modules | |
| with: | |
| # caching node_modules | |
| path: node_modules | |
| key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-build-${{ env.cache-name }}- | |
| ${{ runner.os }}-build- | |
| ${{ runner.os }}- | |
| - name: Install all system dependencies | |
| run: sudo apt-get install -y build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev | |
| - name: Install Dependencies | |
| if: steps.cache-nodemodules.outputs.cache-hit != 'true' | |
| run: | | |
| npm ci --legacy-peer-deps | |
| # - name: Copy patch primeng | |
| # run: | | |
| # cp ./src/main/resources/primeng-galleria.mjs ./node_modules/primeng/fesm2022/primeng-galleria.mjs | |
| # - name: Copy second patch primeng | |
| # run: | | |
| # cp ./src/main/resources/primeng-tooltip.mjs ./node_modules/primeng/fesm2022/primeng-tooltip.mjs | |
| - name: Build | |
| run: | | |
| npm run webapp:build:prodgithubpage | |
| - name: Lint | |
| run: | | |
| npm run lint | |
| - name: Test | |
| run: | | |
| npm run test | |
| - name: Copy 404 | |
| run: | | |
| npm run copy:404 | |
| - name: Deploy | |
| uses: peaceiris/actions-gh-pages@v3 | |
| if: ${{ github.ref == 'refs/heads/main' }} | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./target/classes/static | |