From b57b768b104d4e5ed8f25fd3ed08c77fbe8d3422 Mon Sep 17 00:00:00 2001 From: ice Date: Sun, 21 Apr 2024 18:48:10 -0400 Subject: [PATCH] New Action --- .github/workflows/new.yml | 54 +++++++++++++++++++++++++++++++++++++++ src/app/app.component.ts | 4 +++ 2 files changed, 58 insertions(+) create mode 100644 .github/workflows/new.yml diff --git a/.github/workflows/new.yml b/.github/workflows/new.yml new file mode 100644 index 0000000..46b30c0 --- /dev/null +++ b/.github/workflows/new.yml @@ -0,0 +1,54 @@ +name: Angular GitHub CI +on: + push: + branches: + - main + +jobs: + ci: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [20.x] + + steps: + - uses: actions/checkout@v4 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + 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 Dependencies + if: steps.cache-nodemodules.outputs.cache-hit != 'true' + run: | + npm ci + + - name: Build + run: | + npm run build + - name: Setup Pages + uses: actions/configure-pages@v5 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + # Upload entire repository + path: 'dist/bockpit/browser' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/src/app/app.component.ts b/src/app/app.component.ts index e7269cd..89f816c 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -10,4 +10,8 @@ import { RouterLink, RouterLinkActive, RouterOutlet } from '@angular/router'; }) export class AppComponent { title = 'bockpit'; + + ngOnInit(){ + console.log(`Init`) + } }