Use npx ng to run Angular CLI #35
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .github/workflows/deploy.yml | |
name: Deploy to GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
defaults: | |
run: | |
working-directory: ./blog-app | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
- name: Install dependencies | |
run: npm ci | |
- name: Create .env file | |
run: | | |
echo "FIREBASE_API_KEY=${{ secrets.FIREBASE_API_KEY }}" >> .env | |
echo "FIREBASE_AUTH_DOMAIN=${{ secrets.FIREBASE_AUTH_DOMAIN }}" >> .env | |
echo "FIREBASE_PROJECT_ID=${{ secrets.FIREBASE_PROJECT_ID }}" >> .env | |
echo "FIREBASE_STORAGE_BUCKET=${{ secrets.FIREBASE_STORAGE_BUCKET }}" >> .env | |
echo "FIREBASE_MESSAGING_SENDER_ID=${{ secrets.FIREBASE_MESSAGING_SENDER_ID }}" >> .env | |
echo "FIREBASE_APP_ID=${{ secrets.FIREBASE_APP_ID }}" >> .env | |
cat .env | |
- name: Build and deploy to GitHub page | |
env: | |
CI: true | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: npx ng deploy --dir="dist/blog-app" --repo="https://github.com/buckmanb/Blog.git" --name="Beau Buckman" --email="[email protected]" --base-href="https://buckmanb.github.io/Blog" |