Skip to content

Merge pull request #50 from yqni13/development #25

Merge pull request #50 from yqni13/development

Merge pull request #50 from yqni13/development #25

Workflow file for this run

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: Build
run: npm run build:prod
- name: List build directory for debugging
run: ls -al dist/portfolio/browser
- name: Lint
run: npm run lint
- name: Tests
run: npm run test:prod
- name: Configure Git
run: |
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
git config --global user.name "${{ github.actor }}"
git remote set-url origin https://${{ secrets.PORTFOLIO_PAT }}@github.com/${{ github.repository }}.git
- name: Deploy to GitHub Pages
env:
GH_PAT: ${{ secrets.PORTFOLIO_PAT }}
run: |
npx angular-cli-ghpages --dir=dist/portfolio/browser --repo=https://${{ secrets.PORTFOLIO_PAT }}@github.com/${{ github.repository }}.git --no-silent