mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-27 05:28:43 +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
|
name: Deploy v1 Website
|
||||||
# Skip the deploy if we don't have the right org (facebook), or if this is just a pull request
|
# Skip the deploy if we don't have the right org (facebook), or if this is just a pull request
|
||||||
command: |
|
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"
|
echo "Skipping deploy. No relevant v1 website files have changed"
|
||||||
elif [[ $CIRCLE_PROJECT_USERNAME == "facebook" && -z $CIRCLE_PR_USERNAME ]]; then
|
elif [[ $CIRCLE_PROJECT_USERNAME == "facebook" && -z $CIRCLE_PR_USERNAME ]]; then
|
||||||
echo "Deploying website v1..."
|
echo "Deploying website v1..."
|
||||||
|
@ -88,9 +88,12 @@ jobs:
|
||||||
yarn run write-translations
|
yarn run write-translations
|
||||||
|
|
||||||
# upload translation strings and download 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
|
# IMPORTANT: if this fails due to a Crowdin error like "Project already contains the file"
|
||||||
# In the meantime we should not block the v1 site deployment
|
# Sometimes Crowdin refuse to upload the new versioned docs for obscure reasons
|
||||||
yarn crowdin-upload || echo "Crowdin source upload failure, but we'll continue..."
|
# 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
|
# download only enabled languages
|
||||||
yarn crowdin-download
|
yarn crowdin-download
|
||||||
|
|
|
@ -3,11 +3,7 @@ api_token_env: 'CROWDIN_PERSONAL_TOKEN'
|
||||||
base_path: "."
|
base_path: "."
|
||||||
preserve_hierarchy: true
|
preserve_hierarchy: true
|
||||||
|
|
||||||
files:
|
languages_mapping: &languages_mapping
|
||||||
-
|
|
||||||
source: '/website-1.x/docs/**/*.md'
|
|
||||||
translation: '/website-1.x/translated_docs/%locale%/**/%original_file_name%'
|
|
||||||
languages_mapping: &anchor
|
|
||||||
locale:
|
locale:
|
||||||
'es-ES': 'es-ES'
|
'es-ES': 'es-ES'
|
||||||
'fr': 'fr'
|
'fr': 'fr'
|
||||||
|
@ -26,11 +22,17 @@ files:
|
||||||
'vi': 'vi'
|
'vi': 'vi'
|
||||||
'zh-CN': 'zh-CN'
|
'zh-CN': 'zh-CN'
|
||||||
'zh-TW': 'zh-TW'
|
'zh-TW': 'zh-TW'
|
||||||
|
|
||||||
|
files:
|
||||||
|
-
|
||||||
|
source: '/website-1.x/docs/**/*.md'
|
||||||
|
translation: '/website-1.x/translated_docs/%locale%/**/%original_file_name%'
|
||||||
|
languages_mapping: *languages_mapping
|
||||||
-
|
-
|
||||||
source: '/website-1.x/versioned_docs/**/*.md'
|
source: '/website-1.x/versioned_docs/**/*.md'
|
||||||
translation: '/website-1.x/translated_docs/%locale%/**/%original_file_name%'
|
translation: '/website-1.x/translated_docs/%locale%/**/%original_file_name%'
|
||||||
languages_mapping: *anchor
|
languages_mapping: *languages_mapping
|
||||||
-
|
-
|
||||||
source: '/website-1.x/i18n/en.json'
|
source: '/website-1.x/i18n/en.json'
|
||||||
translation: '/website-1.x/i18n/%locale%.json'
|
translation: '/website-1.x/i18n/%locale%.json'
|
||||||
languages_mapping: *anchor
|
languages_mapping: *languages_mapping
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue