Skip to content

Commit

Permalink
Create main.yml
Browse files Browse the repository at this point in the history
custom workflow for deployment
  • Loading branch information
yqni13 authored Jun 28, 2024
1 parent a849768 commit 7fd2653
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CI / CD for Angular
on:
push:
branches: [ "master" ]

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up node.js
uses: actions/setup-node@v4.0.2
with:
node-version: '20'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Lint
run: npm run lint

- name: Tests
run: npm run test:prod

- name: Build
run: npm run build:prod

- name: Deploy to GitHub Pages
uses: crazy-max/ghaction-github-pages@v4
with:
target_branch: gh-pages
build_dir: dist/portfolio

0 comments on commit 7fd2653

Please sign in to comment.