Skip to content
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

Add i18n to Docs (and Lunaria) #386

Merged
merged 27 commits into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
bdd769c
Update renderer configuration and sponsor title localization
Adammatthiesen Nov 26, 2024
f220e78
add lunaria workflow
Adammatthiesen Nov 26, 2024
2099f98
Update lunaria.config.json with GitHub hosting information
Adammatthiesen Nov 26, 2024
e5de7c7
Update language options in astro.config.mts
Adammatthiesen Nov 26, 2024
3d8b67a
test lunaria starlight plugin and fix typedoc types
Adammatthiesen Nov 26, 2024
2e33e93
remove lunaria plugin
Adammatthiesen Nov 26, 2024
5d81170
Merge branch 'issue-0304' into docs-i18n
Adammatthiesen Nov 26, 2024
6276fdb
upgrade to lunaria v1
Adammatthiesen Nov 27, 2024
676ad2c
Remove lunaria:preview script from package.json
Adammatthiesen Nov 27, 2024
bd613e5
Add cache directory for Lunaria
Adammatthiesen Nov 27, 2024
26e285c
remove lunaria cache as it didnt help
Adammatthiesen Nov 27, 2024
05f48bf
test
Adammatthiesen Nov 27, 2024
3c66088
Merge branch 'issue-0304' into docs-i18n
Adammatthiesen Nov 27, 2024
0f9182a
add build action
Adammatthiesen Nov 28, 2024
6a774b0
test
Adammatthiesen Nov 28, 2024
f60ef2c
Refactor build workflow to use PNPM for dependency management
Adammatthiesen Nov 28, 2024
8698c97
Refactor lunaria.config.ts to exclude typedoc files from the build
Adammatthiesen Nov 28, 2024
20fdd28
Refactor lunaria.config.ts to exclude tracking configuration
Adammatthiesen Nov 28, 2024
eb834e5
update lunaria and docs config
Adammatthiesen Nov 28, 2024
46821ec
Merge branch 'issue-0304' into docs-i18n
Adammatthiesen Nov 28, 2024
39e27cf
update lunaria workflows
Adammatthiesen Nov 28, 2024
c11a5da
remove Astro's custom styling
Adammatthiesen Nov 28, 2024
4dc0625
Refactor lunaria.config.ts to update branch configuration
Adammatthiesen Nov 28, 2024
09f9866
Refactor lunaria.config.ts to update branch configuration
Adammatthiesen Nov 28, 2024
72a7f51
Merge branch 'issue-0304' into docs-i18n
Adammatthiesen Nov 28, 2024
d0e99a8
Update package.json and pnpm-lock.yaml to add @actions/core dependenc…
Adammatthiesen Nov 28, 2024
e6bd96e
Refactor lunaria/components.ts to fix typo in translation complete me…
Adammatthiesen Nov 28, 2024
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
55 changes: 55 additions & 0 deletions .github/workflows/lunaria-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Lunaria Deployments

on:
push:
branches:
# - main
# TODO: Remove issue-304 from the list of branches and enable main once PR#333 is ready to merged
- issue-0304

jobs:
build-overview:
name: Build Lunaria Overview
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.STUDIOCMS_SERVICE_TOKEN }}

- name: Setup PNPM
uses: pnpm/action-setup@v3

- name: Setup Node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
with:
node-version-file: '.node-version'
cache: 'pnpm'

- name: Install Dependencies
run: pnpm install

- name: Build Lunaria Overview
run: pnpm lunaria:build

- name: Upload Overview
uses: actions/upload-pages-artifact@v3
with:
path: "www/docs/dist/lunaria/"

deploy-overview:
runs-on: ubuntu-latest
needs: build-overview

permissions:
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.build-overview.outputs.page_url }}

steps:
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4
42 changes: 42 additions & 0 deletions .github/workflows/lunaria-report-bot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Translation Report Bot

on:
schedule:
- cron: '0 10 * * TUE'
workflow_dispatch:

jobs:
translation:
name: translation_report
if: ${{ github.repository_owner == 'withstudiocms' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup PNPM
uses: pnpm/action-setup@v3

- name: Setup Node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
with:
node-version-file: '.node-version'
cache: 'pnpm'

- name: Install Dependencies
run: pnpm install

- id: message
name: Format Discord message
run: pnpm tsm --require=./scripts/filter-warnings.cjs ./www/docs/scripts/lunaria-report-bot.ts

discord_message:
uses: withstudiocms/automations/.github/workflows/discord-msg.yml@main
needs: translation
secrets:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_I18N_REPORT }}
with:
DISCORD_MESSAGE: ${{ needs.translation.outputs.DISCORD_MESSAGE }}
DISCORD_MESSAGE_EMBEDS: ${{ needs.translation.outputs.DISCORD_MESSAGE_EMBEDS }}
38 changes: 38 additions & 0 deletions .github/workflows/lunaria.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Lunaria

on:
pull_request_target:
types: [opened, synchronize]
branches:
# - main
# TODO: Remove issue-304 from the list of branches and enable main once PR#333 is ready to merged
- issue-304

jobs:
lunaria-overview:
name: Generate Lunaria Overview
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
token: ${{ secrets.STUDIOCMS_SERVICE_TOKEN }}

- name: Setup Node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
with:
node-version-file: '.node-version'
cache: 'pnpm'

- name: Setup PNPM
uses: pnpm/action-setup@v3

- run: pnpm install

- name: Generate Lunaria Overview
uses: lunariajs/action@astro-docs
with:
working-directory: www/docs
token: ${{ secrets.STUDIOCMS_SERVICE_TOKEN }}
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"update:docs": "pnpm --filter docs up --latest",
"web:dev": "pnpm --filter web dev",
"docs:dev": "pnpm --filter docs dev",
"lunaria:build": "pnpm --filter docs lunaria:build",
"translations:changeset": "tsm --require=./scripts/filter-warnings.cjs ./scripts/translation-changeset.ts",
"ci:lint": "biome ci --formatter-enabled=true --organize-imports-enabled=true --reporter=github",
"ci:install": "pnpm install --frozen-lockfile",
Expand All @@ -32,6 +33,7 @@
"ci:snapshot": "pnpx pkg-pr-new publish --pnpm './packages/*'"
},
"devDependencies": {
"@actions/core": "^1.11.1",
"@biomejs/biome": "1.9.4",
"@moonrepo/cli": "1.28.3",
"@changesets/cli": "2.27.9",
Expand Down
Loading