Skip to content

Deploying to github pages with custom domain is not working correctly #4127

Closed
@TautvydasDerzinskas

Description

@TautvydasDerzinskas

Please provide us with the following information:
When deploying Angular-cli application it uses repository name to define a base path. This is an issue when you deploy application to Github repository witch has custom domain enabled for it's Github pages.

You still need to define repository name to get app deployed but in such case you wouldn't want to have that name as absolute path of your application.

""
in index.html should become
"<base href="{{ REPOSITORY NAME or "/" if custom domain is enabled }}">"

OS?

Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
All OS

Versions.

angular-cli: 1.0.0-beta.25.5
node: 7.3.0
os: win32 x64

Repro steps.

  1. Have a repository where Github pages setup uses custom domain
  2. Deploy your app (app must contain components)
  3. Test it

The log given by the failure.

Application tries to load component files using such link structure:

{{ Custom domain}}/{{ Repository name }}/{{ Rest of the path to the component files }}
(I did bold out the problematic part)

Mention any other details that might be useful.


Thanks! We'll be in touch soon.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions