Skip to content

Commit 1a2abf6

Browse files
Deploy on S3 (#45)
* Deploy on S3 Signed-off-by: Stefan Scherer <[email protected]> Signed-off-by: Nick Santos <[email protected]> * Only run on main branch Signed-off-by: Stefan Scherer <[email protected]> --------- Signed-off-by: Stefan Scherer <[email protected]> Signed-off-by: Nick Santos <[email protected]> Signed-off-by: Stefan Scherer <[email protected]>
1 parent d938f32 commit 1a2abf6

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

Diff for: .github/workflows/deploy.yaml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
permissions:
10+
id-token: write
11+
contents: read
12+
13+
jobs:
14+
release:
15+
runs-on: ubuntu-latest
16+
if: github.repository_owner == 'tilt-dev'
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
21+
- name: Install dependencies
22+
run: |
23+
git submodule init
24+
git submodule update
25+
26+
- name: Setup Ruby
27+
uses: ruby/setup-ruby@v1
28+
with:
29+
ruby-version: 2.7.0
30+
bundler-cache: true
31+
- name: Install dependencies
32+
run: |
33+
bundle install
34+
working-directory: docs
35+
36+
# Deploy api.tilt.dev
37+
- name: Configure AWS credentials to access api.tilt.dev
38+
uses: aws-actions/configure-aws-credentials@v3
39+
with:
40+
role-to-assume: arn:aws:iam::710015040892:role/prod-collaboration-api.tilt.dev-20250228142654966700000001
41+
aws-region: us-east-1
42+
- name: Create website api.tilt.dev
43+
run: |
44+
JEKYLL_ENV=production bundle exec jekyll build -d _site
45+
working-directory: docs
46+
47+
- name: Deploy website api.tilt.dev
48+
run: |
49+
aws s3 sync docs/_site s3://prod-collaboration-api.tilt.dev/ --region us-east-1 --delete
50+
- name: Invalidate CloudFront cache for api.tilt.dev
51+
run: |
52+
aws cloudfront create-invalidation --distribution-id E2ZQJPGT02CCGI --paths "/*"

0 commit comments

Comments
 (0)