gpt4 book ai didi

yaml - Travis CI 构建应用程序但不部署到 Surge.sh

转载 作者:行者123 更新时间:2023-12-05 00:31:40 25 4
gpt4 key购买 nike

每次将代码推送到 github 时,我都在尝试构建/部署一个 angular 应用程序。 travis CI 构建通过,但由于某种原因没有部署到 Surge。我将 SURGE_LOGIN 和 SURGE_TOKEN 环境变量添加到存储库设置中,但它仍然不起作用。它不应该在构建日志中提到部署失败吗?知道这里出了什么问题/我如何解决这个问题吗?此外,当构建通过/失败时,我也不会收到电子邮件,即使这是在配置文件中设置的,并且我将电子邮件地址添加到了 SURGE_LOGIN 环境变量中

the end of my travis build log:

42.29s$ ng build -prod

1439
Date: 2017-11-02T11:04:25.130Z

1440
Hash: 5dadab3e49327d48aac1

1441
Time: 38060ms

1442
chunk {0} polyfills.d8d3d78a4deb2ab66856.bundle.js (polyfills) 66.1 kB {4} [initial] [rendered]

1443
chunk {1} styles.4d93494871bdc47b353f.bundle.css (styles) 115 kB {4} [initial] [rendered]

1444
chunk {2} main.725afabe80d80f10fd14.bundle.js (main) 8.08 kB {3} [initial] [rendered]

1445
chunk {3} vendor.4400ceca3ce00f041a26.bundle.js (vendor) 434 kB [initial] [rendered]

1446
chunk {4} inline.fe3295955bbd9314430c.bundle.js (inline) 1.45 kB [entry] [rendered]

1447

1448

1449
The command "ng build -prod" exited with 0.

1450

1451
Done. Your build exited with 0.


my .travis.yml code:

#travis CI build configuration

#build language

language: node_js

#node_js versions

node_js:
- "6.11.2"

#before running the build

before-script:
- npm install #install all dependencies

- npm install -g surge #global surge install

#actual build step
script:
- ng build -prod

#build only on push not on pull requests.

deploy:
provider: surge
skip_cleanup: true
project: ./dist/ #build output path

domain: gaping-feeling.surge.sh #surge domain

#notifications

notifications:
email:
on_success: change #default: change

on_failure: change #default: change

最佳答案

您的问题是 yaml 缩进。 Yaml 是特定于缩进的。所以

a:
b:


a:
b:

它们都有不同的含义。在第一 ab是顶级属性,在后面的情况下 ba 的子属性.你的 yaml 应该是
#travis CI build configuration

#build language

language: node_js

#node_js versions

node_js:
- "6.11.2"

#before running the build

before-script:
- npm install #install all dependencies

- npm install -g surge #global surge install

#actual build step
script:
- ng build -prod

#build only on push not on pull requests.

deploy:
provider: surge
skip_cleanup: true
project: ./dist/ #build output path
domain: gaping-feeling.surge.sh #surge domain

notifications:
email:
on_success: change
on_failure: change

如果您仍然遇到问题,请告诉我。但这应该可以解决问题

关于yaml - Travis CI 构建应用程序但不部署到 Surge.sh,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47074382/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com