Deploy #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy | |
on: | |
push: | |
branches: | |
- master | |
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: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.2.0 | |
bundler-cache: true | |
- name: Install dependencies | |
run: | | |
bundle install | |
- name: Check for changes | |
id: paths | |
uses: dorny/paths-filter@v2 | |
with: | |
filters: | | |
blog: | |
- 'blog/**' | |
- '.github/**' | |
- 'base/**' | |
docs: | |
- 'docs/**' | |
- '.github/**' | |
- 'base/**' | |
site: | |
- 'src/**' | |
- '.github/**' | |
- 'base/**' | |
# Deploy blog.tilt.dev | |
- name: Configure AWS credentials to access blog.tilt.dev | |
uses: aws-actions/configure-aws-credentials@v3 | |
if: steps.paths.outputs.blog == 'true' | |
with: | |
role-to-assume: arn:aws:iam::710015040892:role/prod-collaboration-blog.tilt.dev-20250228142654978300000003 | |
aws-region: us-east-1 | |
- name: Create website blog.tilt.dev | |
if: steps.paths.outputs.blog == 'true' | |
run: | | |
JEKYLL_ENV=production bundle exec jekyll build -s blog -d blog/_site | |
- name: Deploy website blog.tilt.dev | |
if: steps.paths.outputs.blog == 'true' | |
run: | | |
aws s3 sync blog/_site s3://prod-collaboration-blog.tilt.dev/ --region us-east-1 --delete | |
- name: Invalidate CloudFront cache for blog.tilt.dev | |
if: steps.paths.outputs.blog == 'true' | |
run: | | |
aws cloudfront create-invalidation --distribution-id E3N3T1RV0AK16L --paths "/*" | |
# Deploy docs.tilt.dev | |
- name: Configure AWS credentials to access docs.tilt.dev | |
uses: aws-actions/configure-aws-credentials@v3 | |
if: steps.paths.outputs.docs == 'true' | |
with: | |
role-to-assume: arn:aws:iam::710015040892:role/prod-collaboration-docs.tilt.dev-20250228142654979400000004 | |
aws-region: us-east-1 | |
- name: Create website docs.tilt.dev | |
if: steps.paths.outputs.docs == 'true' | |
run: | | |
JEKYLL_ENV=production bundle exec jekyll build -s docs -d docs/_site | |
- name: Deploy website docs.tilt.dev | |
if: steps.paths.outputs.docs == 'true' | |
run: | | |
aws s3 sync docs/_site s3://prod-collaboration-docs.tilt.dev/ --region us-east-1 --delete | |
- name: Invalidate CloudFront cache for docs.tilt.dev | |
if: steps.paths.outputs.docs == 'true' | |
run: | | |
aws cloudfront create-invalidation --distribution-id E1EL5SJ56F1K8Q --paths "/*" | |
# Deploy www.tilt.dev | |
- name: Configure AWS credentials to access www.tilt.dev | |
uses: aws-actions/configure-aws-credentials@v3 | |
if: steps.paths.outputs.site == 'true' | |
with: | |
role-to-assume: arn:aws:iam::710015040892:role/prod-collaboration-tilt.dev-20250228142654974200000002 | |
aws-region: us-east-1 | |
- name: Create website www.tilt.dev | |
if: steps.paths.outputs.site == 'true' | |
run: | | |
JEKYLL_ENV=production bundle exec jekyll build -s src -d src/_site | |
- name: Deploy website www.tilt.dev | |
if: steps.paths.outputs.site == 'true' | |
run: | | |
aws s3 sync src/_site s3://prod-collaboration-tilt.dev/ --region us-east-1 --delete | |
- name: Invalidate CloudFront cache for www.tilt.dev | |
if: steps.paths.outputs.site == 'true' | |
run: | | |
aws cloudfront create-invalidation --distribution-id E34ACMVUMLXEP6 --paths "/*" |