66 - master
77 workflow_dispatch :
88
9- pull_request :
10- branches :
11- - master
12-
139permissions :
1410 id-token : write
1511 contents : read
2117 steps :
2218 - name : Checkout
2319 uses : actions/checkout@v4
24- with :
25- fetch-depth : 0
2620
2721 - name : Setup Ruby
2822 uses : ruby/setup-ruby@v1
@@ -33,50 +27,81 @@ jobs:
3327 run : |
3428 bundle install
3529
30+ - name : Check for changes
31+ id : paths
32+ uses : dorny/paths-filter@v2
33+ with :
34+ filters : |
35+ blog:
36+ - 'blog/**'
37+ - '.github/**'
38+ - 'base/**'
39+ docs:
40+ - 'docs/**'
41+ - '.github/**'
42+ - 'base/**'
43+ site:
44+ - 'src/**'
45+ - '.github/**'
46+ - 'base/**'
47+
3648 # Deploy blog.tilt.dev
3749 - name : Configure AWS credentials to access blog.tilt.dev
3850 uses : aws-actions/configure-aws-credentials@v3
51+ if : steps.paths.outputs.blog == 'true'
3952 with :
4053 role-to-assume : arn:aws:iam::710015040892:role/prod-collaboration-blog.tilt.dev-20250228142654978300000003
4154 aws-region : us-east-1
55+
4256 - name : Create website blog.tilt.dev
57+ if : steps.paths.outputs.blog == 'true'
4358 run : |
4459 JEKYLL_ENV=production bundle exec jekyll build -s blog -d blog/_site
4560 - name : Deploy website blog.tilt.dev
61+ if : steps.paths.outputs.blog == 'true'
4662 run : |
4763 aws s3 sync blog/_site s3://prod-collaboration-blog.tilt.dev/ --region us-east-1 --delete
4864 - name : Invalidate CloudFront cache for blog.tilt.dev
65+ if : steps.paths.outputs.blog == 'true'
4966 run : |
5067 aws cloudfront create-invalidation --distribution-id E3N3T1RV0AK16L --paths "/*"
5168
5269 # Deploy docs.tilt.dev
5370 - name : Configure AWS credentials to access docs.tilt.dev
5471 uses : aws-actions/configure-aws-credentials@v3
72+ if : steps.paths.outputs.docs == 'true'
5573 with :
5674 role-to-assume : arn:aws:iam::710015040892:role/prod-collaboration-docs.tilt.dev-20250228142654979400000004
5775 aws-region : us-east-1
5876 - name : Create website docs.tilt.dev
77+ if : steps.paths.outputs.docs == 'true'
5978 run : |
6079 JEKYLL_ENV=production bundle exec jekyll build -s docs -d docs/_site
6180 - name : Deploy website docs.tilt.dev
81+ if : steps.paths.outputs.docs == 'true'
6282 run : |
6383 aws s3 sync docs/_site s3://prod-collaboration-docs.tilt.dev/ --region us-east-1 --delete
6484 - name : Invalidate CloudFront cache for docs.tilt.dev
85+ if : steps.paths.outputs.docs == 'true'
6586 run : |
6687 aws cloudfront create-invalidation --distribution-id E1EL5SJ56F1K8Q --paths "/*"
6788
6889 # Deploy www.tilt.dev
6990 - name : Configure AWS credentials to access www.tilt.dev
7091 uses : aws-actions/configure-aws-credentials@v3
92+ if : steps.paths.outputs.site == 'true'
7193 with :
7294 role-to-assume : arn:aws:iam::710015040892:role/prod-collaboration-tilt.dev-20250228142654974200000002
7395 aws-region : us-east-1
7496 - name : Create website www.tilt.dev
97+ if : steps.paths.outputs.site == 'true'
7598 run : |
7699 JEKYLL_ENV=production bundle exec jekyll build -s src -d src/_site
77100 - name : Deploy website www.tilt.dev
101+ if : steps.paths.outputs.site == 'true'
78102 run : |
79103 aws s3 sync src/_site s3://prod-collaboration-tilt.dev/ --region us-east-1 --delete
80104 - name : Invalidate CloudFront cache for www.tilt.dev
105+ if : steps.paths.outputs.site == 'true'
81106 run : |
82107 aws cloudfront create-invalidation --distribution-id E34ACMVUMLXEP6 --paths "/*"
0 commit comments