@@ -7,66 +7,17 @@ sudo: false
7
7
8
8
install :
9
9
- bundle install
10
- - pip install --user awscli
11
- - ~/.local/bin/aws configure set preview.cloudfront true
12
10
13
11
# Build and deploy the site to the S3 bucket on push to master, unless PR
14
12
script : bundle exec jekyll build
15
13
branches :
16
14
only :
17
15
- master
16
+
18
17
deploy :
19
- provider : s3
20
- access_key_id : AKIAIDW6AYUZL5LIEXEQ
21
- secret_access_key :
22
- secure : " nj/rlJpDcnu7YC1e80MCnkOAcjB9xCF7wTBI5xYeK02JroCBFmvX1CjTL2w3j/bvWEldWfkaQ8prcZKgHElCy8x51x7xrv2V6PmObSV0vh4fnyCgAQnipIh2PxcdD1R3otMG4VMusXwgMg82bzKNx0IkSzl+TTQNY/cKgvJLcgjSEsonFiXLgZrCKve4Zc7y17UYChPGiCEhsjFOiB0MUj1ABmn7TfTybKv3+BavyZve0cKbQClqbcCaiGX9qmjE9RN/sNTGQXNql1Or+ssW8b6fcmx0he19+9zB82F2wLqRMi2HPt2ZFd8EQ/MVXxNjLe9HN4yI2yslPqrG0fmZupvDsi8wWwcyQJgcgay4voWznXlyhOk67JWcchxR4a+CXErCUAgmNnewWtbw+mxpVVGftduefeEBTZ1OhslczY+zXHj8TmVgIlFKO3IamNIl9NTn9Jyc4sVDFCJo1F1D77EAJji8DlM3AXJ0A0fGs8319rJshX73GLagoZaa2q3j3IBRWsF3rtY7yxxEx3kVNM7ITH+4tv17V7jSrRDfihX3gc/1z6RPC2pLWTkcQe+X0U2gxEhqnPXuIKWqfQp9T+oXiJ63aYe+XQBYRU8GjGoMv/QhTooro6OlGKG0o+61h8AvomNsBx0zxkW1lsSj1pK6hYL8nvUiqtdgzOLBX04="
23
- bucket : forge-rust-lang-org
24
- acl : public_read
25
- skip_cleanup : true
26
- local_dir : _site
27
- region : us-west-1
18
+ provider : pages
19
+ skip-cleanup : true
20
+ github-token : $GITHUB_TOKEN # Set in the settings page of your repository, as a secure variable
21
+ local-dir : _site
28
22
on :
29
23
branch : master
30
- condition : $TRAVIS_PULL_REQUEST = "false"
31
-
32
- # Cloudfront invalidation: If not PR, decrypt credentials, then build
33
- # invalidation payload with `travis/inval-list.py` and use locally-installed
34
- # awscli to submit it
35
- after_success :
36
- - ' [[ $TRAVIS_PULL_REQUEST == "false" ]] && python travis/inval-list.py'
37
-
38
- after_deploy :
39
- - ' [[ $TRAVIS_PULL_REQUEST == "false" ]] && ~/.local/bin/aws cloudfront create-invalidation
40
- --invalidation-batch file://payload.json --distribution-id EKPJCD7EL5ICI'
41
-
42
- # How the magic numbers work and where to put them:
43
- #
44
- # The AWS CLI that you get from pip is the tool likeliest to be up to date
45
- # with the API. It uses some environment variables described in its docs:
46
- # http://docs.aws.amazon.com/cli/latest/topic/config-vars.html
47
- #
48
- # We set them by going to the Travis UI at
49
- # https://travis-ci.org/rust-lang/rust-www/settings and creating the variables
50
- # AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY with the appropriate values.
51
- #
52
- # The values in those env vars come from the Travis account's IAM credentials,
53
- # which you can get from
54
- # https://console.aws.amazon.com/iam/home?region=us-west-1#users if you're
55
- # logged in as someone with the appropriate permissions. The
56
- # cloudfront distribution-id is listed in the ID field of the distribution for
57
- # www-rust-lang-org on the console at
58
- # https://console.aws.amazon.com/cloudfront/home?region=us-west-1.
59
- #
60
- # For the deploy step, the secret access key is encrypted on the command line.
61
- # Encryption uses the Travis CLI, so on your laptop,
62
- #
63
- # $ gem install travis
64
- #
65
- # The string you encrypt for the SECRET_ACCESS_KEY will be the same as the
66
- # string in the AWS_SECRET_ACCESS_KEY variable that you set earlier.
67
- # To encrypt the single variable:
68
- #
69
- # $ travis encrypt -r rust-lang/rust-www "abc123"
70
- #
71
- # The output of that command will contain a `secure: "7890wxyzPQR"` line which
72
- # you then add to `.travis.yml` under `secret_access_key`.
0 commit comments