You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by ki...@apache.org on 2022/02/16 01:26:02 UTC
[incubator-seatunnel-website] branch main updated: Fix deploy publish bug (#57)
This is an automated email from the ASF dual-hosted git repository.
kirs pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-seatunnel-website.git
The following commit(s) were added to refs/heads/main by this push:
new 848642f Fix deploy publish bug (#57)
848642f is described below
commit 848642fd8877b47793ac5560d5bfd1d7fec83081
Author: wuchunfu <31...@qq.com>
AuthorDate: Wed Feb 16 09:25:58 2022 +0800
Fix deploy publish bug (#57)
---
.github/workflows/deploy.yml | 7 +++----
tools/build-docs.sh | 15 ++++++++-------
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 9e186e2..f97a580 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -18,23 +18,22 @@ jobs:
node-version: 14
- name: Documents Sync
run: |
+ chmod -R 775 ./tools/build-docs.sh
bash ./tools/build-docs.sh
shell: bash
- name: install
run: |
- cd ~/web
npm install
- name: Build
run: |
- cd ~/web
npm run build
- name: Copy .asf.yaml
run: |
- cp .asf.yaml ~/web/build
+ cp .asf.yaml build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- publish_dir: web/build
+ publish_dir: build
publish_branch: asf-site
diff --git a/tools/build-docs.sh b/tools/build-docs.sh
index 818a6ed..6c24a74 100644
--- a/tools/build-docs.sh
+++ b/tools/build-docs.sh
@@ -1,12 +1,13 @@
-#!/bin/bash
+#!/usr/bin/env bash
WEBSITE_REPO="https://github.com/apache/incubator-seatunnel-website.git"
MAIN_REPO="https://github.com/apache/incubator-seatunnel.git"
+WEBSITE_REPO_NAME="incubator-seatunnel-website"
WEBSITE_NAME="seatunnel-website"
MAIN_NAME="seatunnel"
-WORK_PATH="/tmp/seatunnel"
+WORK_PATH=~/work/incubator-seatunnel-website
if [ ! -d ${WORK_PATH} ]; then
mkdir -p ${WORK_PATH}
@@ -25,10 +26,10 @@ echo "===>>>: current work path: ${WORK_PATH}"
echo "===>>>: Clone git repositories"
-echo "===>>>: Clone ${MAIN_NAME} repositories"
+echo "===>>>: Clone ${WEBSITE_REPO} repositories to ${WEBSITE_NAME}"
git clone --depth 1 ${WEBSITE_REPO} ${WORK_PATH}/${WEBSITE_NAME}
-echo "===>>>: Clone ${WEBSITE_NAME} repositories"
+echo "===>>>: Clone ${MAIN_REPO} repositories to ${MAIN_NAME}"
git clone --depth 1 ${MAIN_REPO} ${WORK_PATH}/${MAIN_NAME}
echo "===>>>: Replace elements inside md files"
@@ -36,7 +37,7 @@ cp -rf ${WORK_PATH}/${MAIN_NAME}/docs/en/* ${WORK_PATH}/${WEBSITE_NAME}/docs/
echo "===>>>: Replace docs Done"
-echo "===>>>: Copy ${WEBSITE_NAME} to home directory"
-cp -rf ${WORK_PATH}/${WEBSITE_NAME} ~/web
+echo "===>>>: Copy ${WORK_PATH}/${WEBSITE_NAME} to ${WORK_PATH}/${WEBSITE_REPO_NAME} directory"
+cp -rf ${WORK_PATH}/${WEBSITE_NAME} ${WORK_PATH}/${WEBSITE_REPO_NAME}
-echo "===>>>: Replace web Done"
+echo "===>>>: Replace ${WORK_PATH}/${WEBSITE_REPO_NAME} Done"