Skip to content

0.0.3

0.0.3 #12

Workflow file for this run

name: Build and Deploy to Tigris
on:
push:
branches:
- main
- feature/agent-tracker-docs
pull_request:
branches:
- main
jobs:
build:
name: Build Documentation
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: website/package-lock.json
- name: Install dependencies
working-directory: ./website
run: npm ci
- name: Build website
working-directory: ./website
run: npm run build
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: website-build
path: website/build/
retention-days: 1
deploy:
name: Deploy to Tigris
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/feature/agent-tracker-docs')
environment:
name: production
url: https://pipie-static.fly.storage.tigris.dev/
steps:
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: website-build
path: build/
- name: Deploy to Tigris S3
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ENDPOINT_URL_S3: ${{ vars.AWS_ENDPOINT_URL_S3 }}
AWS_REGION: ${{ vars.AWS_REGION }}
BUCKET_NAME: ${{ vars.BUCKET_NAME }}
run: |
# Sync static assets with longer cache
aws s3 sync build/ s3://${BUCKET_NAME}/ \
--delete \
--cache-control "public, max-age=3600" \
--exclude "*.html" \
--exclude "*.xml" \
--exclude "sitemap.txt"
# Sync HTML files with shorter cache
aws s3 sync build/ s3://${BUCKET_NAME}/ \
--delete \
--cache-control "public, max-age=300" \
--exclude "*" \
--include "*.html" \
--include "*.xml" \
--include "sitemap.txt"
echo "✅ Deployed to https://pipie-static.fly.storage.tigris.dev/"