Skip to content

Create deploy.yml

Create deploy.yml #1

Workflow file for this run

name: Deploy Angular app to GitHub Pages
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build -- --configuration production --base-href="/${{ github.event.repository.name }}/"
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: dist/$(grep -m 1 "outputPath" angular.json | awk -F: '{print $2}' | sed 's/[", ]//g')

Check failure on line 31 in .github/workflows/deploy.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/deploy.yml

Invalid workflow file

You have an error in your yaml syntax on line 31
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages