Skip to content

Commit 52f4775

Browse files
committed
deploy on s3
Signed-off-by: Nick Santos <nick.santos@docker.com>
1 parent 87ddb74 commit 52f4775

File tree

1 file changed

+82
-0
lines changed

1 file changed

+82
-0
lines changed

.github/workflows/deploy.yaml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
workflow_dispatch:
8+
9+
pull_request:
10+
branches:
11+
- master
12+
13+
permissions:
14+
id-token: write
15+
contents: read
16+
17+
jobs:
18+
release:
19+
runs-on: ubuntu-latest
20+
if: github.repository_owner == 'tilt-dev'
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
with:
25+
fetch-depth: 0
26+
27+
- name: Setup Ruby
28+
uses: ruby/setup-ruby@v1
29+
with:
30+
ruby-version: 3.2.0
31+
bundler-cache: true
32+
- name: Install dependencies
33+
run: |
34+
bundle install
35+
36+
# Deploy blog.tilt.dev
37+
- name: Configure AWS credentials to access blog.tilt.dev
38+
uses: aws-actions/configure-aws-credentials@v3
39+
with:
40+
role-to-assume: arn:aws:iam::710015040892:role/prod-collaboration-blog.tilt.dev-20250228142654978300000003
41+
aws-region: us-east-1
42+
- name: Create website blog.tilt.dev
43+
run: |
44+
JEKYLL_ENV=production jekyll build -s blog -d blog/_site
45+
- name: Deploy website blog.tilt.dev
46+
run: |
47+
aws s3 cp --content-type="application/json" --acl=public-read blog/_site s3://prod-collaboration-blog.tilt.dev/
48+
- name: Invalidate CloudFront cache for blog.tilt.dev
49+
run: |
50+
aws cloudfront create-invalidation --distribution-id E3N3T1RV0AK16L --paths "/*"
51+
52+
# Deploy docs.tilt.dev
53+
- name: Configure AWS credentials to access docs.tilt.dev
54+
uses: aws-actions/configure-aws-credentials@v3
55+
with:
56+
role-to-assume: arn:aws:iam::710015040892:role/prod-collaboration-docs.tilt.dev-20250228142654979400000004
57+
aws-region: us-east-1
58+
- name: Create website docs.tilt.dev
59+
run: |
60+
JEKYLL_ENV=production jekyll build -s docs -d docs/_site
61+
- name: Deploy website docs.tilt.dev
62+
run: |
63+
aws s3 cp --content-type="application/json" --acl=public-read docs/_site s3://prod-collaboration-docs.tilt.dev/
64+
- name: Invalidate CloudFront cache for docs.tilt.dev
65+
run: |
66+
aws cloudfront create-invalidation --distribution-id E1EL5SJ56F1K8Q --paths "/*"
67+
68+
# Deploy www.tilt.dev
69+
- name: Configure AWS credentials to access www.tilt.dev
70+
uses: aws-actions/configure-aws-credentials@v3
71+
with:
72+
role-to-assume: arn:aws:iam::710015040892:role/prod-collaboration-tilt.dev-20250228142654974200000002
73+
aws-region: us-east-1
74+
- name: Create website www.tilt.dev
75+
run: |
76+
JEKYLL_ENV=production jekyll build -s src -d src/_site
77+
- name: Deploy website www.tilt.dev
78+
run: |
79+
aws s3 cp --content-type="application/json" --acl=public-read www/_site s3://prod-collaboration-www.tilt.dev/
80+
- name: Invalidate CloudFront cache for www.tilt.dev
81+
run: |
82+
aws cloudfront create-invalidation --distribution-id E34ACMVUMLXEP6 --paths "/*"

0 commit comments

Comments
 (0)