{"id":38782,"date":"2022-12-26T09:48:54","date_gmt":"2022-12-29T22:34:48","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e5%b0%9d%e8%af%95%e4%ba%86%e4%bd%bf%e7%94%a8angular-cli-ghpages%ef%bc%88ng-github-pagesdeploy%e6%97%a0%e6%b3%95%e8%bf%90%e8%a1%8c%ef%bc%89\/"},"modified":"2024-04-29T07:01:36","modified_gmt":"2024-04-28T23:01:36","slug":"%e6%88%91%e5%b0%9d%e8%af%95%e4%ba%86%e4%bd%bf%e7%94%a8angular-cli-ghpages%ef%bc%88ng-github-pagesdeploy%e6%97%a0%e6%b3%95%e8%bf%90%e8%a1%8c%ef%bc%89","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e5%b0%9d%e8%af%95%e4%ba%86%e4%bd%bf%e7%94%a8angular-cli-ghpages%ef%bc%88ng-github-pagesdeploy%e6%97%a0%e6%b3%95%e8%bf%90%e8%a1%8c%ef%bc%89\/","title":{"rendered":"\u6211\u5c1d\u8bd5\u4e86\u4f7f\u7528angular-cli-ghpages\uff08ng github-pages:deploy\u65e0\u6cd5\u8fd0\u884c\uff09"},"content":{"rendered":"<h1>0. GitHub Pages\u7684deploy\u547d\u4ee4\u65e0\u6cd5\u8fd0\u884c<\/h1>\n<pre class=\"post-pre\"><code>ng github-pages:deploy\r\nThe specified <span class=\"nb\">command <\/span>github-pages:deploy is invalid. For available options, see <span class=\"sb\">`<\/span>ng <span class=\"nb\">help<\/span><span class=\"sb\">`<\/span><span class=\"nb\">.<\/span>\r\n<\/code><\/pre>\n<p>\u6211\u8ba4\u4e3a\u5f53\u4f7f\u7528angular-cli\u5c06angular\u5e94\u7528\u90e8\u7f72\u5230github.io\u4e0a\u65f6\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u7c7b\u4f3c\u7684\u9519\u8bef\u589e\u591a\u7684\u60c5\u51b5\u3002<\/p>\n<p>angular-cli\u4e5f\u8bb8\u505c\u6b62\u652f\u6301\u8be5\u9009\u9879\u3002<br \/>\n\u53d6\u800c\u4ee3\u4e4b\u7684\u662f\uff0c\u6700\u8fd1\u51fa\u73b0\u4e86\u4e00\u4e2a\u540d\u4e3aangular-cli-ghpages\u7684\u5de5\u5177\u3002<\/p>\n<h1>1. \u4e0d\u5982\u4f7f\u7528angular-cli-ghpages\u6765\u4ee3\u66ff\uff01<\/h1>\n<p>\u76ee\u524d\u7684\u73af\u5883\u5c31\u662f\u8fd9\u6837\u7684\u611f\u89c9\u3002<\/p>\n<pre class=\"post-pre\"><code>ng <span class=\"nt\">--version<\/span>\r\n\r\n@angular\/cli: 1.0.0-rc.0\r\nnode: 7.7.2\r\nos: darwin x64\r\n@angular\/common: 2.4.9\r\n@angular\/compiler: 2.4.9\r\n@angular\/core: 2.4.9\r\n@angular\/forms: 2.4.9\r\n@angular\/http: 2.4.9\r\n@angular\/platform-browser: 2.4.9\r\n@angular\/platform-browser-dynamic: 2.4.9\r\n@angular\/router: 3.4.9\r\n@angular\/cli: 1.0.0-rc.0\r\n@angular\/compiler-cli: 2.4.9\r\n<\/code><\/pre>\n<p>\u6309\u7167 angular-cli-ghpages \u7684 README \u4e2d\u63cf\u8ff0\u7684\u65b9\u5f0f\u6765\u6784\u5efa\u548c\u90e8\u7f72\u5e94\u7528\u7a0b\u5e8f\u8fdb\u884c\u5c1d\u8bd5\u3002<\/p>\n<pre class=\"post-pre\"><code>ng build <span class=\"nt\">--prod<\/span> <span class=\"nt\">--base-href<\/span> <span class=\"s2\">\"https:\/\/USERNAME.github.io\/REPOSITORY\/\"<\/span>\r\nangular-cli-ghpages <span class=\"o\">[<\/span>OPTIONS]\r\n<\/code><\/pre>\n<p>Successfully published!\u3068\u30d7\u30ed\u30f3\u30d7\u30c8\u306b\u8868\u793a\u3055\u308c\u3066\u3001github.io\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068\u3001angular2 tutorial\u3067\u4f5c\u3063\u305f\u30a2\u30d7\u30ea\u304c\u52d5\u3044\u3066\u3044\u305f\u3002<\/p>\n<p>angular-cli-ghpages\u306e\u4ee3\u308f\u308a\u306bngh\u3068\u3044\u3046\u77ed\u7e2e\u30b3\u30de\u30f3\u30c9\u3067\u3082\u4f7f\u3048\u308b\u3088\u3046\u3067\u3059\u3002\u3053\u3063\u3061\u306e\u65b9\u304c\u697d\u3002<br \/>\n\u3068\u3044\u3046\u308f\u3051\u3067\u3053\u308c\u304b\u3089\u306fngh\u3067\u3059\u306d\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>0. GitHub Pages\u7684deploy\u547d\u4ee4\u65e0\u6cd5\u8fd0\u884c ng github-pages:deploy The [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-38782","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u6211\u5c1d\u8bd5\u4e86\u4f7f\u7528angular-cli-ghpages\uff08ng github-pages:deploy\u65e0\u6cd5\u8fd0\u884c\uff09 - Blog - Silicon Cloud<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/\u6211\u5c1d\u8bd5\u4e86\u4f7f\u7528angular-cli-ghpages\uff08ng-github-pagesdeploy\u65e0\u6cd5\u8fd0\u884c\uff09\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u6211\u5c1d\u8bd5\u4e86\u4f7f\u7528angular-cli-ghpages\uff08ng github-pages:deploy\u65e0\u6cd5\u8fd0\u884c\uff09\" \/>\n<meta property=\"og:description\" content=\"0. GitHub Pages\u7684deploy\u547d\u4ee4\u65e0\u6cd5\u8fd0\u884c ng github-pages:deploy The [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u6211\u5c1d\u8bd5\u4e86\u4f7f\u7528angular-cli-ghpages\uff08ng-github-pagesdeploy\u65e0\u6cd5\u8fd0\u884c\uff09\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2022-12-29T22:34:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-28T23:01:36+00:00\" \/>\n<meta name=\"author\" content=\"\u6e05, \u5b87\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u6e05, \u5b87\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e5%b0%9d%e8%af%95%e4%ba%86%e4%bd%bf%e7%94%a8angular-cli-ghpages%ef%bc%88ng-github-pagesdeploy%e6%97%a0%e6%b3%95%e8%bf%90%e8%a1%8c%ef%bc%89\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e5%b0%9d%e8%af%95%e4%ba%86%e4%bd%bf%e7%94%a8angular-cli-ghpages%ef%bc%88ng-github-pagesdeploy%e6%97%a0%e6%b3%95%e8%bf%90%e8%a1%8c%ef%bc%89\/\",\"name\":\"\u6211\u5c1d\u8bd5\u4e86\u4f7f\u7528angular-cli-ghpages\uff08ng github-pages:deploy\u65e0\u6cd5\u8fd0\u884c\uff09 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2022-12-29T22:34:48+00:00\",\"dateModified\":\"2024-04-28T23:01:36+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e5%b0%9d%e8%af%95%e4%ba%86%e4%bd%bf%e7%94%a8angular-cli-ghpages%ef%bc%88ng-github-pagesdeploy%e6%97%a0%e6%b3%95%e8%bf%90%e8%a1%8c%ef%bc%89\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e5%b0%9d%e8%af%95%e4%ba%86%e4%bd%bf%e7%94%a8angular-cli-ghpages%ef%bc%88ng-github-pagesdeploy%e6%97%a0%e6%b3%95%e8%bf%90%e8%a1%8c%ef%bc%89\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e5%b0%9d%e8%af%95%e4%ba%86%e4%bd%bf%e7%94%a8angular-cli-ghpages%ef%bc%88ng-github-pagesdeploy%e6%97%a0%e6%b3%95%e8%bf%90%e8%a1%8c%ef%bc%89\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u6211\u5c1d\u8bd5\u4e86\u4f7f\u7528angular-cli-ghpages\uff08ng github-pages:deploy\u65e0\u6cd5\u8fd0\u884c\uff09\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e\",\"name\":\"\u6e05, \u5b87\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g\",\"caption\":\"\u6e05, \u5b87\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/qingyu\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e5%b0%9d%e8%af%95%e4%ba%86%e4%bd%bf%e7%94%a8angular-cli-ghpages%ef%bc%88ng-github-pagesdeploy%e6%97%a0%e6%b3%95%e8%bf%90%e8%a1%8c%ef%bc%89\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u6211\u5c1d\u8bd5\u4e86\u4f7f\u7528angular-cli-ghpages\uff08ng github-pages:deploy\u65e0\u6cd5\u8fd0\u884c\uff09 - Blog - Silicon Cloud","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/\u6211\u5c1d\u8bd5\u4e86\u4f7f\u7528angular-cli-ghpages\uff08ng-github-pagesdeploy\u65e0\u6cd5\u8fd0\u884c\uff09\/","og_locale":"zh_CN","og_type":"article","og_title":"\u6211\u5c1d\u8bd5\u4e86\u4f7f\u7528angular-cli-ghpages\uff08ng github-pages:deploy\u65e0\u6cd5\u8fd0\u884c\uff09","og_description":"0. GitHub Pages\u7684deploy\u547d\u4ee4\u65e0\u6cd5\u8fd0\u884c ng github-pages:deploy The [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u6211\u5c1d\u8bd5\u4e86\u4f7f\u7528angular-cli-ghpages\uff08ng-github-pagesdeploy\u65e0\u6cd5\u8fd0\u884c\uff09\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2022-12-29T22:34:48+00:00","article_modified_time":"2024-04-28T23:01:36+00:00","author":"\u6e05, \u5b87","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u6e05, \u5b87"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e5%b0%9d%e8%af%95%e4%ba%86%e4%bd%bf%e7%94%a8angular-cli-ghpages%ef%bc%88ng-github-pagesdeploy%e6%97%a0%e6%b3%95%e8%bf%90%e8%a1%8c%ef%bc%89\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e5%b0%9d%e8%af%95%e4%ba%86%e4%bd%bf%e7%94%a8angular-cli-ghpages%ef%bc%88ng-github-pagesdeploy%e6%97%a0%e6%b3%95%e8%bf%90%e8%a1%8c%ef%bc%89\/","name":"\u6211\u5c1d\u8bd5\u4e86\u4f7f\u7528angular-cli-ghpages\uff08ng github-pages:deploy\u65e0\u6cd5\u8fd0\u884c\uff09 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2022-12-29T22:34:48+00:00","dateModified":"2024-04-28T23:01:36+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e5%b0%9d%e8%af%95%e4%ba%86%e4%bd%bf%e7%94%a8angular-cli-ghpages%ef%bc%88ng-github-pagesdeploy%e6%97%a0%e6%b3%95%e8%bf%90%e8%a1%8c%ef%bc%89\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e5%b0%9d%e8%af%95%e4%ba%86%e4%bd%bf%e7%94%a8angular-cli-ghpages%ef%bc%88ng-github-pagesdeploy%e6%97%a0%e6%b3%95%e8%bf%90%e8%a1%8c%ef%bc%89\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e5%b0%9d%e8%af%95%e4%ba%86%e4%bd%bf%e7%94%a8angular-cli-ghpages%ef%bc%88ng-github-pagesdeploy%e6%97%a0%e6%b3%95%e8%bf%90%e8%a1%8c%ef%bc%89\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u6211\u5c1d\u8bd5\u4e86\u4f7f\u7528angular-cli-ghpages\uff08ng github-pages:deploy\u65e0\u6cd5\u8fd0\u884c\uff09"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e","name":"\u6e05, \u5b87","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g","caption":"\u6e05, \u5b87"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/qingyu\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e5%b0%9d%e8%af%95%e4%ba%86%e4%bd%bf%e7%94%a8angular-cli-ghpages%ef%bc%88ng-github-pagesdeploy%e6%97%a0%e6%b3%95%e8%bf%90%e8%a1%8c%ef%bc%89\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/38782","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=38782"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/38782\/revisions"}],"predecessor-version":[{"id":83756,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/38782\/revisions\/83756"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=38782"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=38782"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=38782"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}