Skip to content

Commit

Permalink
feat: .yml deployment file
Browse files Browse the repository at this point in the history
  • Loading branch information
derveydylan committed Feb 21, 2025
1 parent f33f2bd commit 9dc5c2c
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Deploy Angular to GitHub Pages

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install dependencies
run: npm install

- name: Build Angular project
run: npx ng build --base-href "/"

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: dist/togglight/browser

deploy:
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit 9dc5c2c

Please sign in to comment.