how do I deploy an Angular Project to Github Pages?

385 Views Asked by At

I have been following along with the Angular Documentation for building your first app

I want to deploy the application as it is, but when using CLI to run ng deploy I receive an error that reads as the following

Terminal responses from running ng deploy | error is 'NOT SUPPORTED: keyword"id", use "$id" for schemaID'

The app Runs correctly locally, but is not building on GH pages. Repo Link

I have read over the documentation on the NPM page for angular-cli-ghpages

When running ng add angular-cli-ghpages is when I receive the "NOT SUPPORTED" response.

Afterwards, I attempted to manually insert the Configuration into the angular.json file as such:

        "deploy": {
          "builder": "angular-cli-ghpages:deploy",
          "options": {
            "baseHref": "https://wloverde.github.io/AngularJS-TavernCrawl/",
            "name": "wloverde",
            "email": "[email protected]"
          }
        },

when this didn't work I attempted to run $ npx angular-cli-ghpages --dir=dist/Angular-js-tavern-crawl it stated that it successfully published, but doesn't render anything onto the page.

I am deploying the site from the gh-pages branch created from running the npx CLI

0

There are 0 best solutions below