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

Build test (draft) #1905

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
40 changes: 22 additions & 18 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: Build docs on PR merge

on:
pull_request:
types: [opened, reopened, synchronize]
push:
branches:
- master
Expand All @@ -22,16 +24,16 @@ jobs:
fetch-depth: "0"
- uses: actions/setup-node@v2
with:
node-version: "18"
node-version: "20"

- uses: actions/cache@v3
with:
path: |
${{ github.workspace }}/**/.cache
key: |
${{ runner.os }}-docusaurus-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-docusaurus-${{ hashFiles('**/yarn.lock') }}
# - uses: actions/cache@v3
# with:
# path: |
# ${{ github.workspace }}/**/.cache
# key: |
# ${{ runner.os }}-docusaurus-${{ hashFiles('**/yarn.lock') }}
# restore-keys: |
# ${{ runner.os }}-docusaurus-${{ hashFiles('**/yarn.lock') }}

- name: Set Git config
run: |
Expand All @@ -43,24 +45,26 @@ jobs:
git fetch
git checkout build
git pull
git merge --no-ff master -m "Auto-merge main back to build"
# git merge --no-ff master -m "Auto-merge main back to build"

- name: Install dependencies and build
run: |
cd website
curl https://raw.githubusercontent.com/near/docs/bucanero-patch-1/website/docusaurus.config.js > docusaurus.config.js
yarn
yarn docusaurus clear
yarn build
yarn crowdin:upload
# yarn crowdin:upload

- name: Commit build
run: |
git add -f ./website/build ./website/.docusaurus ./website/i18n
if git commit -m "add new build";then
git push
else
echo "Nothing to commit"
fi
echo "ok"
# git add -f ./website/build ./website/.docusaurus ./website/i18n
# if git commit -m "add new build";then
# git push
# else
# echo "Nothing to commit"
# fi
env:
NODE_OPTIONS: --max-old-space-size=8192
# NODE_OPTIONS: --max-old-space-size=8192
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
2 changes: 1 addition & 1 deletion website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ const config = {
},
i18n: {
defaultLocale: 'en',
locales: ['en', 'ko', 'vi', 'zh-CN'],
locales: ['en', 'ko', 'vi'],
localeConfigs: {
'zh-CN': {
label: '简体中文',
Expand Down
Loading