Skip to content

Commit

Permalink
new file: .github/workflows/github-actions.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
buckmanb committed Feb 24, 2025
1 parent f8a289f commit 3485c5c
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# .github/workflows/deploy.yml
name: Deploy to GitHub Pages

on:
push:
branches:
- main # or your default branch

jobs:
build-and-deploy:
runs-on: ubuntu-latest

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

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

- name: Install dependencies
run: npm ci

- name: Create .env file
run: |
echo "FIREBASE_API_KEY=${{ secrets.FIREBASE_API_KEY }}" >> .env
echo "FIREBASE_AUTH_DOMAIN=${{ vars.FIREBASE_AUTH_DOMAIN }}" >> .env
echo "FIREBASE_PROJECT_ID=${{ vars.FIREBASE_PROJECT_ID }}" >> .env
echo "FIREBASE_STORAGE_BUCKET=${{ vars.FIREBASE_STORAGE_BUCKET }}" >> .env
echo "FIREBASE_MESSAGING_SENDER_ID=${{ vars.FIREBASE_MESSAGING_SENDER_ID }}" >> .env
echo "FIREBASE_APP_ID=${{ vars.FIREBASE_APP_ID }}" >> .env
- name: Build
run: npm run build -- --base-href /Blog/

- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: dist/blog-app/browser # Adjust this path based on your Angular 17 output directory
branch: gh-pages

0 comments on commit 3485c5c

Please sign in to comment.