Skip to content

Deploy on S3 #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 5, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Deploy

on:
push:
branches:
- main
workflow_dispatch:

permissions:
id-token: write
contents: read

jobs:
release:
runs-on: ubuntu-latest
if: github.repository_owner == 'tilt-dev'
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install dependencies
run: |
git submodule init
git submodule update

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.0
bundler-cache: true
- name: Install dependencies
run: |
bundle install
working-directory: docs

# Deploy api.tilt.dev
- name: Configure AWS credentials to access api.tilt.dev
uses: aws-actions/configure-aws-credentials@v3
with:
role-to-assume: arn:aws:iam::710015040892:role/prod-collaboration-api.tilt.dev-20250228142654966700000001
aws-region: us-east-1
- name: Create website api.tilt.dev
run: |
JEKYLL_ENV=production bundle exec jekyll build -d _site
working-directory: docs

- name: Deploy website api.tilt.dev
run: |
aws s3 sync docs/_site s3://prod-collaboration-api.tilt.dev/ --region us-east-1 --delete
- name: Invalidate CloudFront cache for api.tilt.dev
run: |
aws cloudfront create-invalidation --distribution-id E2ZQJPGT02CCGI --paths "/*"