You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kvrocks.apache.org by ti...@apache.org on 2022/05/15 12:15:28 UTC

[incubator-kvrocks-website] branch main updated: ci: add jekyll pages actions (#3)

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

tison pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kvrocks-website.git


The following commit(s) were added to refs/heads/main by this push:
     new a021f90  ci: add jekyll pages actions (#3)
a021f90 is described below

commit a021f90e0121634fea1a0d8447a7e1eb98e625c4
Author: tison <wa...@gmail.com>
AuthorDate: Sun May 15 20:15:24 2022 +0800

    ci: add jekyll pages actions (#3)
    
    Signed-off-by: tison <wa...@gmail.com>
---
 .asf.yaml                    |  4 ---
 .github/workflows/jekyll.yml | 25 +++++++++------
 README.md                    | 74 +++++---------------------------------------
 _config.yml                  |  9 ++++--
 4 files changed, 29 insertions(+), 83 deletions(-)

diff --git a/.asf.yaml b/.asf.yaml
index 35897b0..0224beb 100644
--- a/.asf.yaml
+++ b/.asf.yaml
@@ -31,7 +31,3 @@ github:
 
 publish:
   whoami: asf-site
-
-jekyll:
-  whoami: main
-  target: asf-site
diff --git a/.github/workflows/jekyll.yml b/.github/workflows/jekyll.yml
index 4fc05ee..640f824 100644
--- a/.github/workflows/jekyll.yml
+++ b/.github/workflows/jekyll.yml
@@ -15,7 +15,7 @@
 #  specific language governing permissions and limitations
 #  under the License.
 
-name: Jekyll site CI
+name: Jekyll Pages
 
 on:
   push:
@@ -24,14 +24,19 @@ on:
     branches: [ main ]
 
 jobs:
-  build:
-
+  pages:
     runs-on: ubuntu-latest
-
     steps:
-    - uses: actions/checkout@v3
-    - name: Build the site in the jekyll/builder container
-      run: |
-        docker run \
-        -v ${{ github.workspace }}:/srv/jekyll -v ${{ github.workspace }}/_site:/srv/jekyll/_site \
-        jekyll/builder:latest /bin/bash -c "chmod -R 777 /srv/jekyll && jekyll build --future"
+      - uses: actions/checkout@v3
+      - uses: ruby/setup-ruby@v1
+        with:
+          ruby-version: '3.0'
+          bundler-cache: true
+      - run: bundle install
+      - run: bundle exec jekyll build
+      - uses: peaceiris/actions-gh-pages@v3
+        if: github.event_name != 'pull_request'
+        with:
+          github_token: ${{ secrets.GITHUB_TOKEN }}
+          publish_dir: ./target
+          publish_branch: asf-site
diff --git a/README.md b/README.md
index 32c6a9d..17d6b3e 100644
--- a/README.md
+++ b/README.md
@@ -1,57 +1,16 @@
-<!--
-{% comment %}
-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
+# Apache Kvrocks (Incubating) Official Website
 
-http://www.apache.org/licenses/LICENSE-2.0
+This project keeps all sources used for building up Apache Kvrocks (Incubating) official website which's served at https://kvrocks.apache.org/.
 
-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.
-{% endcomment %}
--->
-
-# Apache Website Template
-
-This project contains a template web site that aims to follow all the various required
-Apache Website Policies.
-
-This template was generated using [Jekyll](https://jekyllrb.com/).
-
-To use it, copy the `site` directory into your project.  You must also
-include licensing information from the `LICENSE` and `NOTICE` files in
-your own project.
-
-# How to deploy your project's web site
+## How to deploy your project's web site
 
 (In the following instructions we assume that your project is called
 'Apache Foo'; search and replace with your actual project name.)
 
 ## Setup
 
-```
-1. cd site
-2. svn co https://svn.apache.org/repos/asf/foo/site target
-3. sudo apt-get install rubygems ruby2.1-dev zlib1g-dev
-4. sudo gem install bundler github-pages jekyll
-5. bundle install
-```
-
-## Add javadoc
-
-If your project supports javadoc, you can copy the generated javadoc
-into svn each time you need to re-generate.
-
-```
-1. cd ..
-2. mvn -DskipTests site
-3. mv target/site/apidocs site/target
+```shell
+bundle install
 ```
 
 ## Running locally
@@ -60,26 +19,7 @@ Before opening a pull request, you can preview your contributions by
 running from within the directory:
 
 ```
-1. bundle exec jekyll serve
-2. Open [http://localhost:4000](http://localhost:4000)
-```
-
-## Pushing to site
-
-```
-1. cd site/target
-2. svn status
-3. You'll need to `svn add` any new files
-4. svn ci
+bundle exec jekyll serve
 ```
 
-Within a few minutes, svnpubsub should kick in and you'll be able to
-see the results at
-[foo.apache.org](https://foo.apache.org/).
-
-## Adding contributors
-
-To add a contributor to the project, or to modify existing contributors,
-edit `site/_data/contributors.yml`.
-The [project members]([http://localhost:4000/community.html#project-members]
-list will re-generate.
+Now, you can open [http://localhost:4000](http://localhost:4000) for preview.
diff --git a/_config.yml b/_config.yml
index 10283d7..aeb5a18 100644
--- a/_config.yml
+++ b/_config.yml
@@ -12,7 +12,7 @@
 # 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.
-#
+
 markdown: kramdown
 permalink: /news/:year/:month/:day/:title/
 excerpt_separator: ""
@@ -25,5 +25,10 @@ keep_files: [".git", ".svn", "apidocs"]
 # The base path where the website is deployed
 baseurl: 
 
-# End _config.yml
+exclude:
+  - tmp/
+  - vendor/
+  - Gemfile
+  - Gemfile.lock
 
+# End _config.yml