Github Actions
The OneStarter template comes with a full suite of Github Actions workflows:
backend-cf-deploy.yml
: Builds and deploys the backend to Cloudflare workersbackend-test.yml
: Runs biome checks on the backenddb-ci.yml
: Runs DB tests on Supabasedb-deploy.yml
: Deploys DB changes to live Supabase projectsfrontend-cf-deploy.yml
: Builds and deploys the frontend to Cloudflare pagesfrontend-i18n-export.yml
: Extracts localization keys tofrontend/public/locales
frontend-test.yml
: Runs biome checks on the frontendinfra-tf-deploy.yml
: Deploys the terraform infrastructurerp-cf-deploy.yml
: Builds and deploys the reverse proxy to Cloudflare workersrp-test.yml
: Runs biome checks on the reverse proxy
note
OneStarter assumes you have a git workflow where:
main
is the production branchdevelop
is the staging branch
If you change these, you will need to update your workflows accordingly
Sample Workflow for Localization Management (Tolgee)
In case you use a third party provider, such as Tolgee for translation management, here is a set of example workflows you can use.
# .github/workflows/frontend-i18n-push.yml
name: 'i18n Push'
on:
workflow_dispatch:
push:
paths:
- 'frontend/public/locales/**'
branches:
- develop
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
defaults:
run:
working-directory: ./frontend
jobs:
i18n-push:
runs-on: ubuntu-latest
name: Extract message keys
env:
TOLGEE_API_KEY: ${{ secrets.TOLGEE_API_KEY }}
TOLGEE_PROJECT_ID: ${{ vars.TOLGEE_PROJECT_ID }}
steps:
- name: Checkout Source Code
uses: actions/checkout@v4
- name: Install bun
uses: oven-sh/setup-bun@v2
- name: Installing Tolgee CLI
run: bun add -g @tolgee/cli
- name: Push translations
run: tolgee push --api-key=$TOLGEE_API_KEY --project-id=$TOLGEE_PROJECT_ID --force-mode=OVERRIDE --remove-other-keys
# .github/workflows/frontend-i18n-pull.yml
name: 'i18n Pull'
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *' # this line schedules the job to run once every day
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
pull-requests: write
contents: write
jobs:
i18n-pull:
runs-on: ubuntu-latest
name: Extract message keys
env:
TOLGEE_API_KEY: ${{ secrets.TOLGEE_API_KEY }}
TOLGEE_PROJECT_ID: ${{ vars.TOLGEE_PROJECT_ID }}
steps:
- name: Checkout Source Code
uses: actions/checkout@v4
- name: Install bun
uses: oven-sh/setup-bun@v2
- name: Installing Tolgee CLI
run: bun add -g @tolgee/cli
- name: Pull translations
working-directory: ./frontend
run: tolgee pull --api-key=$TOLGEE_API_KEY --project-id=$TOLGEE_PROJECT_ID --path public/locales
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
commit-message: "chore: i18n pull new translations"
title: "chore: i18n pull new translations"
body: "New translations pulled"
branch: "chore/i18n-translation"
token: ${{ secrets.CI_GITHUB_TOKEN }}
add-paths: |
frontend/public/locales
base: develop
This is just a sample, so the work required to set up email templates is an exercise left to the reader.
You will need to add the following secrets.
TOLGEE_API_KEY
TOLGEE_PROJECT_ID
CI_GITHUB_TOKEN