You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by hx...@apache.org on 2021/08/03 12:48:58 UTC

[iotdb] branch website-asf-yaml created (now 16dc2d4)

This is an automated email from the ASF dual-hosted git repository.

hxd pushed a change to branch website-asf-yaml
in repository https://gitbox.apache.org/repos/asf/iotdb.git.


      at 16dc2d4  add .asf.yaml file for updating website automatically

This branch includes the following new commits:

     new 16dc2d4  add .asf.yaml file for updating website automatically

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[iotdb] 01/01: add .asf.yaml file for updating website automatically

Posted by hx...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hxd pushed a commit to branch website-asf-yaml
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 16dc2d4fa2d686eaa90c64c95f69b3af679521e5
Author: xiangdong huang <sa...@gmail.com>
AuthorDate: Tue Aug 3 20:47:57 2021 +0800

    add .asf.yaml file for updating website automatically
---
 site/README-zh.md       |   9 ++++-
 site/README.md          |   5 +++
 site/pom.xml            | 100 +++++++++++++++++++++++++++++-------------------
 site/src/main/.asf.yaml |  25 ++++++++++++
 4 files changed, 98 insertions(+), 41 deletions(-)

diff --git a/site/README-zh.md b/site/README-zh.md
index 5034fe0..09c7be1 100644
--- a/site/README-zh.md
+++ b/site/README-zh.md
@@ -29,7 +29,7 @@
 
 ## 如何建立
 
-跑`mvn compile -DskipTests  -P compile-site -P download-site` 
+跑`mvn compile -DskipTests  -P compile-site -P download-site`
 
 ## 如何调试
 
@@ -56,6 +56,13 @@ Apache ID和密码是必须的
 
 或直接运行`mvn compile scm-publish:publish-scm -Dusername={你的Apache ID} -Dpassword={你的Apache账号密码}  -P compile-site`
 
+## 上传并预览
+
+## Preview your website
+
+在上传命令中增加 `-Dscm-branch=asf-staging`, 则网站会被发布到 https://iotdb.staged.apache.org, 用于预览。
+
+
 ## 常见问题
 
 如果你在MacOS遇到以下问题:
diff --git a/site/README.md b/site/README.md
index 93b30d1..456d315 100644
--- a/site/README.md
+++ b/site/README.md
@@ -69,6 +69,11 @@ Apache ID and passwored is needed.
 
 Or run `mvn compile scm-publish:publish-scm -Dusername={YOUR_APACHE_ID} -Dpassword={YOUR_APACHE_PASSWORD}  -P compile-site`
 
+## Preview your website
+
+If you add `-Dscm-branch=asf-staging` in your command, then the website will be published to https://iotdb.staged.apache.org
+
+
 ## FAQ
 
 If you get an error on your MacOS:
diff --git a/site/pom.xml b/site/pom.xml
index 20013f7..24824d8 100644
--- a/site/pom.xml
+++ b/site/pom.xml
@@ -30,6 +30,7 @@
     <artifactId>iotdb-website</artifactId>
     <properties>
         <frontend-maven-plugin.version>1.9.1</frontend-maven-plugin.version>
+        <scm-branch>asf-site</scm-branch>
     </properties>
     <distributionManagement>
         <site>
@@ -295,6 +296,52 @@
                             </execution>
                         </executions>
                     </plugin>
+                    <!--install node and npm, then run `npm install` and `npm run build`-->
+                    <plugin>
+                        <groupId>com.github.eirslett</groupId>
+                        <artifactId>frontend-maven-plugin</artifactId>
+                        <version>1.9.1</version>
+                        <configuration>
+                            <installDirectory>${project.build.directory}/tools</installDirectory>
+                            <workingDirectory>${project.build.directory}/vue-source</workingDirectory>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <id>install-node-and-npm</id>
+                                <goals>
+                                    <goal>install-node-and-npm</goal>
+                                </goals>
+                                <phase>compile</phase>
+                                <configuration>
+                                    <nodeVersion>v12.16.2</nodeVersion>
+                                    <npmVersion>6.14.4</npmVersion>
+                                </configuration>
+                            </execution>
+                            <!-- Install all project dependencies -->
+                            <execution>
+                                <id>npm install</id>
+                                <goals>
+                                    <goal>npm</goal>
+                                </goals>
+                                <phase>compile</phase>
+                                <!-- Optional configuration which provides for running any npm command -->
+                                <configuration>
+                                    <arguments>install</arguments>
+                                </configuration>
+                            </execution>
+                            <!-- Build and minify static files -->
+                            <execution>
+                                <id>npm run build</id>
+                                <phase>compile</phase>
+                                <goals>
+                                    <goal>npm</goal>
+                                </goals>
+                                <configuration>
+                                    <arguments>run build</arguments>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
                     <!-- copy single files, and move UserGuide of master into tmp folder -->
                     <plugin>
                         <groupId>com.coderplus.maven.plugins</groupId>
@@ -317,6 +364,10 @@
                                             <sourceFile>${basedir}/src/main/deploy.js</sourceFile>
                                             <destinationFile>${project.build.directory}/vue-source/deploy.js</destinationFile>
                                         </fileSet>
+                                        <fileSet>
+                                            <sourceFile>${basedir}/src/main/.asf.yaml</sourceFile>
+                                            <destinationFile>${project.build.directory}/vue-source/src/.vuepress/dist/.asf.yaml</destinationFile>
+                                        </fileSet>
                                     </fileSets>
                                 </configuration>
                             </execution>
@@ -343,50 +394,19 @@
                                     <destinationFile>${project.build.directory}/existing/zh/Master</destinationFile>
                                 </configuration>
                             </execution>
-                        </executions>
-                    </plugin>
-                    <!--install node and npm, then run `npm install` and `npm run build`-->
-                    <plugin>
-                        <groupId>com.github.eirslett</groupId>
-                        <artifactId>frontend-maven-plugin</artifactId>
-                        <version>1.9.1</version>
-                        <configuration>
-                            <installDirectory>${project.build.directory}/tools</installDirectory>
-                            <workingDirectory>${project.build.directory}/vue-source</workingDirectory>
-                        </configuration>
-                        <executions>
-                            <execution>
-                                <id>install-node-and-npm</id>
-                                <goals>
-                                    <goal>install-node-and-npm</goal>
-                                </goals>
-                                <phase>compile</phase>
-                                <configuration>
-                                    <nodeVersion>v12.16.2</nodeVersion>
-                                    <npmVersion>6.14.4</npmVersion>
-                                </configuration>
-                            </execution>
-                            <!-- Install all project dependencies -->
                             <execution>
-                                <id>npm install</id>
-                                <goals>
-                                    <goal>npm</goal>
-                                </goals>
-                                <phase>compile</phase>
-                                <!-- Optional configuration which provides for running any npm command -->
-                                <configuration>
-                                    <arguments>install</arguments>
-                                </configuration>
-                            </execution>
-                            <!-- Build and minify static files -->
-                            <execution>
-                                <id>npm run build</id>
+                                <id>copy-asf-yaml</id>
                                 <phase>compile</phase>
                                 <goals>
-                                    <goal>npm</goal>
+                                    <goal>copy</goal>
                                 </goals>
                                 <configuration>
-                                    <arguments>run build</arguments>
+                                    <fileSets>
+                                        <fileSet>
+                                            <sourceFile>${basedir}/src/main/.asf.yaml</sourceFile>
+                                            <destinationFile>${project.build.directory}/vue-source/src/.vuepress/dist/.asf.yaml</destinationFile>
+                                        </fileSet>
+                                    </fileSets>
                                 </configuration>
                             </execution>
                         </executions>
@@ -398,7 +418,7 @@
                             <!-- mono-module doesn't require site:stage -->
                             <content>${project.build.directory}/vue-source/src/.vuepress/dist</content>
                             <!-- branch where to deploy -->
-                            <scmBranch>asf-site</scmBranch>
+                            <scmBranch>${scm-branch}</scmBranch>
                         </configuration>
                     </plugin>
                     <!--<plugin>
diff --git a/site/src/main/.asf.yaml b/site/src/main/.asf.yaml
new file mode 100644
index 0000000..99c6d99
--- /dev/null
+++ b/site/src/main/.asf.yaml
@@ -0,0 +1,25 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+staging:
+  profile: ~
+  whoami:  asf-staging
+
+publish:
+  whoami:  asf-site
\ No newline at end of file