mirror of
https://github.com/tuono-labs/tuono
synced 2026-07-26 05:12:46 -07:00
56 lines
1.6 KiB
YAML
56 lines
1.6 KiB
YAML
name: Documentation Website Deploy on AWS S3
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'main'
|
|
paths:
|
|
- '.github/**'
|
|
- 'apps/documentation/**'
|
|
|
|
jobs:
|
|
deploy-documentation:
|
|
name: Deploy
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install NodeJS Dependencies
|
|
uses: ./.github/actions/install-node-dependencies
|
|
|
|
- name: Setup rust
|
|
uses: actions-rust-lang/setup-rust-toolchain@v1
|
|
|
|
# ⬇️ Keep in sync with `.github/workflows/ci-documentation.yml`
|
|
- name: Read tuono version used by the documentation
|
|
id: get_tuono_version
|
|
run: |
|
|
VERSION=$(pnpm ls tuono --filter=documentation | grep "tuono " | sed -E 's/.* ([0-9]+\.[0-9]+\.[0-9]+).*/\1/')
|
|
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
|
|
|
- name: Install tuono
|
|
run: cargo install tuono@${{ steps.get_tuono_version.outputs.version }}
|
|
# ⬆️
|
|
|
|
- name: Build project
|
|
working-directory: ./apps/documentation
|
|
run: tuono build --static
|
|
|
|
- name: Deploy
|
|
uses: reggionick/s3-deploy@v4
|
|
with:
|
|
folder: apps/documentation/out/static
|
|
bucket: tuono-documentation
|
|
bucket-region: eu-west-3
|
|
dist-id: ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }}
|
|
invalidation: /
|
|
delete-removed: true
|
|
no-cache: true
|
|
private: true
|
|
files-to-include: '{.*/**,**}'
|