mirror of
https://github.com/facebook/docusaurus.git
synced 2025-04-29 18:27:56 +02:00
fix(v1): Fix v1 site deployment with Crowdin again... (#4410)
This commit is contained in:
parent
32da39a0d8
commit
fa1d681abc
2 changed files with 30 additions and 25 deletions
|
@ -78,7 +78,7 @@ jobs:
|
|||
name: Deploy v1 Website
|
||||
# Skip the deploy if we don't have the right org (facebook), or if this is just a pull request
|
||||
command: |
|
||||
if ! git diff-tree --no-commit-id --name-only -r HEAD | grep -E "(docusaurus-1\.x\/.*)|(website-1\.x\/.*)"; then
|
||||
if ! git diff-tree --no-commit-id --name-only -r HEAD | grep -E "(crowdin-v1.yml)|(docusaurus-1\.x\/.*)|(website-1\.x\/.*)"; then
|
||||
echo "Skipping deploy. No relevant v1 website files have changed"
|
||||
elif [[ $CIRCLE_PROJECT_USERNAME == "facebook" && -z $CIRCLE_PR_USERNAME ]]; then
|
||||
echo "Deploying website v1..."
|
||||
|
@ -88,9 +88,12 @@ jobs:
|
|||
yarn run write-translations
|
||||
|
||||
# upload translation strings and download translations
|
||||
# TODO we have a weird Crowdin error "Project already contains the file", trying to resolve that with support
|
||||
# In the meantime we should not block the v1 site deployment
|
||||
yarn crowdin-upload || echo "Crowdin source upload failure, but we'll continue..."
|
||||
# IMPORTANT: if this fails due to a Crowdin error like "Project already contains the file"
|
||||
# Sometimes Crowdin refuse to upload the new versioned docs for obscure reasons
|
||||
# Workaround: upload manually the new versioned files through the Crowdin UI...
|
||||
# If the files already exist on Crowdin, the source upload will now work...
|
||||
# All this has been extensively reported to their support already.
|
||||
yarn crowdin-upload
|
||||
|
||||
# download only enabled languages
|
||||
yarn crowdin-download
|
||||
|
|
|
@ -3,34 +3,36 @@ api_token_env: 'CROWDIN_PERSONAL_TOKEN'
|
|||
base_path: "."
|
||||
preserve_hierarchy: true
|
||||
|
||||
languages_mapping: &languages_mapping
|
||||
locale:
|
||||
'es-ES': 'es-ES'
|
||||
'fr': 'fr'
|
||||
'it': 'it'
|
||||
'ja': 'ja'
|
||||
'ko': 'ko'
|
||||
'nl': 'nl'
|
||||
'pt-BR': 'pt-BR'
|
||||
'ro': 'ro'
|
||||
'ru': 'ru'
|
||||
'sk': 'sk-SK'
|
||||
'sr': 'sr'
|
||||
'sv-SE': 'sv-SE'
|
||||
'tr': 'tr'
|
||||
'uk': 'uk'
|
||||
'vi': 'vi'
|
||||
'zh-CN': 'zh-CN'
|
||||
'zh-TW': 'zh-TW'
|
||||
|
||||
files:
|
||||
-
|
||||
source: '/website-1.x/docs/**/*.md'
|
||||
translation: '/website-1.x/translated_docs/%locale%/**/%original_file_name%'
|
||||
languages_mapping: &anchor
|
||||
locale:
|
||||
'es-ES': 'es-ES'
|
||||
'fr': 'fr'
|
||||
'it': 'it'
|
||||
'ja': 'ja'
|
||||
'ko': 'ko'
|
||||
'nl': 'nl'
|
||||
'pt-BR': 'pt-BR'
|
||||
'ro': 'ro'
|
||||
'ru': 'ru'
|
||||
'sk': 'sk-SK'
|
||||
'sr': 'sr'
|
||||
'sv-SE': 'sv-SE'
|
||||
'tr': 'tr'
|
||||
'uk': 'uk'
|
||||
'vi': 'vi'
|
||||
'zh-CN': 'zh-CN'
|
||||
'zh-TW': 'zh-TW'
|
||||
languages_mapping: *languages_mapping
|
||||
-
|
||||
source: '/website-1.x/versioned_docs/**/*.md'
|
||||
translation: '/website-1.x/translated_docs/%locale%/**/%original_file_name%'
|
||||
languages_mapping: *anchor
|
||||
languages_mapping: *languages_mapping
|
||||
-
|
||||
source: '/website-1.x/i18n/en.json'
|
||||
translation: '/website-1.x/i18n/%locale%.json'
|
||||
languages_mapping: *anchor
|
||||
languages_mapping: *languages_mapping
|
||||
|
|
Loading…
Add table
Reference in a new issue