...
This commit is contained in:
35
build-dev.sh
Executable file
35
build-dev.sh
Executable file
@@ -0,0 +1,35 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
cd "${script_dir}"
|
||||
|
||||
export PATH=${BASE}/node_modules/.bin:$PATH
|
||||
|
||||
|
||||
echo "Docs directory: $script_dir"
|
||||
|
||||
# Change urls from production to staging
|
||||
|
||||
sed -i '
|
||||
s|url: '\''https://docs.threefold.io'\''|url: '\''https://threefold.info'\''|
|
||||
s|baseUrl: '\''/'\''|baseUrl: '\''/docs4dev'\''|
|
||||
' docusaurus.config.ts
|
||||
|
||||
sed -i "s|/docs/introduction|/docs4dev/docs/introduction|g" ./src/pages/index.tsx
|
||||
|
||||
#bun build
|
||||
#bun ${script_dir}/node_modules/.bin/docusaurus build
|
||||
pnpm build
|
||||
|
||||
rsync -rv --delete ${script_dir}/build/ root@info.ourworld.tf:/root/hero/www/info/docs4dev
|
||||
|
||||
# Change urls from staging to production
|
||||
|
||||
sed -i '
|
||||
s|url: '\''https://threefold.info'\''|url: '\''https://docs.threefold.io'\''|
|
||||
s|baseUrl: '\''/docs4dev'\''|baseUrl: '\''/'\''|
|
||||
' docusaurus.config.ts
|
||||
|
||||
sed -i "s|/docs4dev/docs/introduction|/docs/introduction|g" ./src/pages/index.tsx
|
||||
Reference in New Issue
Block a user