diff --git a/.asf.yaml b/.asf.yaml index 364b9b2545..be2dc0e977 100644 --- a/.asf.yaml +++ b/.asf.yaml @@ -42,6 +42,9 @@ github: required_approving_review_count: 1 required_linear_history: true + gh-pages: + whatever: Just a placeholder to make it take effects + features: wiki: false issues: true @@ -56,3 +59,7 @@ notifications: issues: issues@iceberg.apache.org pullrequests: issues@iceberg.apache.org jira_options: link label link label + +publish: + whoami: gh-pages + hostname: rust.iceberg.apache.org \ No newline at end of file diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml new file mode 100644 index 0000000000..28842f2ab5 --- /dev/null +++ b/.github/workflows/website.yml @@ -0,0 +1,56 @@ +# 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. + +name: Website + +on: + push: + branches: + - main + pull_request: + branches: + - main + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup mdBook + uses: peaceiris/actions-mdbook@v1 + with: + mdbook-version: '0.4.36' + + - name: Build + working-directory: website + run: mdbook build + + - name: Copy asf file + run: cp .asf.yaml ./website/book/.asf.yaml + + - name: Deploy to gh-pages + uses: peaceiris/actions-gh-pages@v3.9.2 + if: github.event_name == 'push' && github.ref_name == 'main' + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: website/book + publish_branch: gh-pages diff --git a/.licenserc.yaml b/.licenserc.yaml index cd362bc94d..662cea8d58 100644 --- a/.licenserc.yaml +++ b/.licenserc.yaml @@ -24,5 +24,6 @@ header: - 'LICENSE' - 'NOTICE' - '**/*.json' - + # Generated content by mdbook + - 'website/book' comment: on-failure diff --git a/website/.gitignore b/website/.gitignore new file mode 100644 index 0000000000..6155ce0790 --- /dev/null +++ b/website/.gitignore @@ -0,0 +1,18 @@ +# 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. + +book diff --git a/website/README.md b/website/README.md new file mode 100644 index 0000000000..9914b82226 --- /dev/null +++ b/website/README.md @@ -0,0 +1,40 @@ + + +# Iceberg Rust Website + +## Setup + +Install mdbook first + +```shell +cargo install mdbook +``` + +## Preview + +```shell +mdbook serve +``` + +## Build + +```shell +mdbook build +``` diff --git a/website/book.toml b/website/book.toml new file mode 100644 index 0000000000..86c00e1158 --- /dev/null +++ b/website/book.toml @@ -0,0 +1,30 @@ +# 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. + +[book] +authors = ["Iceberg Community"] +language = "en" +multilingual = false +src = "src" +title = "Iceberg Rust" + +[output.html] +git-repository-url = "https://github.com/apache/iceberg-rust" +git-repository-icon = "fa-github" +edit-url-template = "https://github.com/apache/iceberg-rust/edit/main/website/{path}" +cname = "rust.iceberg.opendal.org" +no-section-label = true \ No newline at end of file diff --git a/website/src/CONTRIBUTING.md b/website/src/CONTRIBUTING.md new file mode 120000 index 0000000000..f939e75f21 --- /dev/null +++ b/website/src/CONTRIBUTING.md @@ -0,0 +1 @@ +../../CONTRIBUTING.md \ No newline at end of file diff --git a/website/src/SUMMARY.md b/website/src/SUMMARY.md new file mode 100644 index 0000000000..c0aa07fbc9 --- /dev/null +++ b/website/src/SUMMARY.md @@ -0,0 +1,28 @@ + + +- [Introduction](./introduction.md) + +# User Guide + +- [Install](./install.md) + +# Developer Guide + +- [Contributing](./CONTRIBUTING.md) \ No newline at end of file diff --git a/website/src/install.md b/website/src/install.md new file mode 100644 index 0000000000..3a96cb5b07 --- /dev/null +++ b/website/src/install.md @@ -0,0 +1,32 @@ + + +# Install + +Add `iceberg` into `Cargo.toml` dependencies: + +```toml +iceberg = "0.2.0" +``` + +iceberg is under active development, you may want to use the git version instead: + +```toml +iceberg = { git = "https://github.com/apache/iceberg-rust", rev = "commit-hash" } +``` diff --git a/website/src/introduction.md b/website/src/introduction.md new file mode 100644 index 0000000000..260ec690ed --- /dev/null +++ b/website/src/introduction.md @@ -0,0 +1,22 @@ + + +# Iceberg Rust + +Iceberg Rust is a rust implementation for accessing iceberg tables.