Skip to content

Hosting Angular project in Github Pages using Github Action #1

Hosting Angular project in Github Pages using Github Action

Hosting Angular project in Github Pages using Github Action #1

Workflow file for this run

name: Deploy Angular App to GitHub Pages
on:
push:
branches:
- main # or master, depending on your default branch
permissions:
contents: write
jobs:
build-and-deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: Frontend/three-panel-layout
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: npm install
- name: Build Angular App
run: npm run build -- --base-href=three-panel-layout
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: Frontend/three-panel-layout/dist/three-panel-layout