diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml new file mode 100644 index 00000000000..e8fd32956ff --- /dev/null +++ b/.github/workflows/deploy-docs.yml @@ -0,0 +1,81 @@ +# 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 +# +# https://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. +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. + + +# Sample workflow for building and deploying a Hugo site to GitHub Pages +name: Deploy Hugo site to Pages + +on: + # Runs on pushes targeting the default branch + push: + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + # Build job + build: + runs-on: ubuntu-latest + env: + HUGO_VERSION: 0.132.1 + steps: + - name: Install Hugo CLI + run: | + wget -q -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \ + && sudo dpkg -i ${{ runner.temp }}/hugo.deb + - name: Install Dart Sass + run: sudo snap install dart-sass + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 +# ref: asf-site +# - name: Reset to main +# run: git reset --hard origin/main + - name: Install Node.js dependencies + working-directory: doc/ + run: ls -lah && npm ci + - name: Build with Hugo + working-directory: doc/ + env: + HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache + HUGO_ENVIRONMENT: production + TZ: America/Los_Angeles + run: | + hugo \ + --gc \ + --minify \ + --baseURL "https://fokko.github.io/avro/" + - name: Commit new site + run: | + set -ex + mv doc/public docs/ + git config --global user.email "dev@avro.apache.org" + git config --global user.name "Github Actions" + git checkout --orphan asf-site-staging + git add . + git commit -m "Update docs" + git checkout asf-site + git reset --hard asf-site-staging + git push origin asf-site --force + diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index d96e7ce1437..00000000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "doc/themes/docsy"] - path = doc/themes/docsy - url = https://github.com/google/docsy diff --git a/doc/.gitignore b/doc/.gitignore index b56c8f8a701..48b779e950c 100644 --- a/doc/.gitignore +++ b/doc/.gitignore @@ -1,5 +1,4 @@ public/ resources/ node_modules/ -package-lock.json .hugo_build.lock diff --git a/doc/Dockerfile b/doc/Dockerfile deleted file mode 100644 index 1a671067c65..00000000000 --- a/doc/Dockerfile +++ /dev/null @@ -1,22 +0,0 @@ -# -# 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 -# -# https://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. -# - -FROM klakegg/hugo:ext-alpine - -RUN apk add git diff --git a/doc/README.md b/doc/README.md index 99768b54fdc..f75ba8a3332 100644 --- a/doc/README.md +++ b/doc/README.md @@ -39,20 +39,33 @@ docker run --rm -v $(pwd):/src -p 1313:1313 jakejarvis/hugo-extended:latest \ sudo chown -R $USER:$USER build/staging-web ``` -## Avro version - -(TODO) +## New release When a new version of Apache Avro is released: 1. Change the value of `params.avroversion` in `config.toml` 2. Add a new entry to the `Releases` pages in the `Blog` section, for example: -``` -cp content/en/blog/releases/avro-1.10.2-released.md content/en/blog/releases/avro-1.11.0-released.md +```sh +cp content/en/blog/releases/avro-1.12.0-released.md content/en/blog/releases/avro-1.13.0-released.md ``` -## Updating the https://avro.apache.org website from a distribution +### Upload the docs -(TODO) +Copy the Markdown content from the release tar to the `doc/content/en/docs/1.12.0`: +```sh +tar xvfz avro-src-1.12.0.tar.gz +``` + +Here we need to copy everything, except the `api/` directory to this repository. The markdown will be rendered using Hugo, and the API docs are already html, and will be served from the ASF SVN. The `api/` directory needs to be uploaded to SVN: + +```sh +svn co https://svn.apache.org/repos/asf/avro/site +cd site/publish/docs/ +mkdir 1.12.0 +cd 1.12.0 +mkdir api +cp -r ~/Desktop/avro-release-dist/avro-1.12.0/avro-doc-1.12.0/api/ api/ +svn commit -m "Avro 1.12.0 release" +``` diff --git a/doc/config.toml b/doc/config.toml index 70164b6cb60..2fcf46d71d6 100644 --- a/doc/config.toml +++ b/doc/config.toml @@ -132,7 +132,7 @@ archived_version = false # The version number for the version of the docs represented in this doc set. # Used in the "version-banner" partial to display a version number for the # current doc set. -version = "++version++" +version = "1.12.0" # A link to latest version of the docs. Used in the "version-banner" partial to # point people to the main doc site. @@ -258,14 +258,14 @@ url = "http://www.apache.org/security/" icon = "fa fa-envelope" desc = "Discuss development issues around the project" -[[params.versions]] - version = "++version++ (Current)" - url = "/docs/++version++/" - [[params.versions]] version = "1.12.0" url = "https://avro.apache.org/docs/1.12.0/" +[[params.versions]] +version = "1.11.3" +url = "https://avro.apache.org/docs/1.11.3/" + [[params.versions]] version = "1.11.2" url = "https://avro.apache.org/docs/1.11.2/" diff --git a/doc/content/en/_index.html b/doc/content/en/_index.html index 618a99a14bf..57c806025ba 100644 --- a/doc/content/en/_index.html +++ b/doc/content/en/_index.html @@ -69,4 +69,4 @@
a data serialization system
+{{< blocks/link-down color="info" >}} +{{< /blocks/cover >}} + + +{{% blocks/lead color="primary" %}} + +Apache Avro™ is the leading serialization format for record data, and first choice for streaming data pipelines. It offers excellent schema evolution, and has implementations for the JVM (Java, Kotlin, Scala, …), Python, C/C++/C#, PHP, Ruby, Rust, JavaScript, and even Perl. + +{{% /blocks/lead %}} + + +{{< blocks/section color="dark" type="row">}} + + +{{% blocks/feature icon="fab fa-java" title="Getting started with Java" url="/docs/++version++/getting-started-java" %}} +For Java / JVM users, find out everything you need to know about specifying a schema, (de)serializing Avro data and code generation. +{{% /blocks/feature %}} + +{{% blocks/feature icon="fab fa-python" title="Getting started with Python" url="/docs/++version++/getting-started-python" %}} +For Python users, find out everything you need to know about specifying a schema and (de)serializing Avro data. +{{% /blocks/feature %}} + +{{% blocks/feature icon="fad fa-comments" title="Join Our Community!" url="/community/" %}} +Learn from or connect with other users in our open and welcoming community. We'd love to hear from you! +{{% /blocks/feature %}} + +{{< /blocks/section >}} + diff --git a/doc/content/en/blog/releases/avro-1.12.0-released.md b/doc/content/en/blog/releases/avro-1.12.0-released.md index a38f9264825..d4703858ebd 100755 --- a/doc/content/en/blog/releases/avro-1.12.0-released.md +++ b/doc/content/en/blog/releases/avro-1.12.0-released.md @@ -1,7 +1,7 @@ --- -title: "Avro 1.11.3" -linkTitle: "Avro 1.11.3" -date: 2023-09-22 +title: "Avro 1.12.0" +linkTitle: "Avro 1.12.0" +date: 2024-08-05 --- + +This is a short guide for getting started with Apache Avro™ using Java. This guide only covers using Avro for data serialization; see Patrick Hunt's [Avro RPC Quick Start](https://github.com/phunt/avro-rpc-quickstart) for a good introduction to using Avro for RPC. + +## Download + +Avro implementations for C, C++, C#, Java, PHP, Python, and Ruby can be downloaded from the [Apache Avro™ Download]({{< relref "/project/download" >}}) page. This guide uses Avro {{< avro_version >}}, the latest version at the time of writing. For the examples in this guide, download avro-{{< avro_version >}}.jar and avro-tools-{{< avro_version >}}.jar. + +Alternatively, if you are using Maven, add the following dependency to your POM: + +```xml +