Skip to content

Commit

Permalink
New Action
Browse files Browse the repository at this point in the history
  • Loading branch information
ice committed Apr 21, 2024
1 parent fbd2123 commit b57b768
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/new.yml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@ import { RouterLink, RouterLinkActive, RouterOutlet } from '@angular/router';
})
export class AppComponent {
title = 'bockpit';

ngOnInit(){
console.log(`Init`)
}
}

0 comments on commit b57b768

Please sign in to comment.