Skip to content

Commit 1b9e817

Browse files
StefanScherernicks
authored andcommitted
Deploy on S3
Signed-off-by: Stefan Scherer <[email protected]> Signed-off-by: Nick Santos <[email protected]>
1 parent d938f32 commit 1b9e817

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+
pull_request:
10+
branches:
11+
- main
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+
working-directory: docs
36+
37+
# Deploy api.tilt.dev
38+
- name: Configure AWS credentials to access api.tilt.dev
39+
uses: aws-actions/configure-aws-credentials@v3
40+
with:
41+
role-to-assume: arn:aws:iam::710015040892:role/prod-collaboration-api.tilt.dev-20250228142654966700000001
42+
aws-region: us-east-1
43+
- name: Create website api.tilt.dev
44+
run: |
45+
JEKYLL_ENV=production bundle exec jekyll build
46+
working-directory: docs
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)