Skip to content

Commit

Permalink
Publish using Github Action
Browse files Browse the repository at this point in the history
  • Loading branch information
Fokko authored and martin-g committed Aug 15, 2024
1 parent 1c993d3 commit fc4da5b
Show file tree
Hide file tree
Showing 59 changed files with 7,325 additions and 101 deletions.
78 changes: 78 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# 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
- 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 "[email protected]"
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
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

1 change: 0 additions & 1 deletion doc/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
public/
resources/
node_modules/
package-lock.json
.hugo_build.lock
22 changes: 0 additions & 22 deletions doc/Dockerfile

This file was deleted.

27 changes: 20 additions & 7 deletions doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
```
10 changes: 5 additions & 5 deletions doc/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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/"
Expand Down
2 changes: 1 addition & 1 deletion doc/content/en/_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ <h1 class="display-1 mt-0 mt-md-5 pb-4">Apache Avro™ - a data serialization sy
Learn from or connect with other users in our open and welcoming community. We'd love to hear from you!
{{% /blocks/feature %}}

{{< /blocks/section >}}
{{< /blocks/section >}}
40 changes: 40 additions & 0 deletions doc/content/en/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
title: Apache Avro
---

{{< blocks/cover title="Apache Avro™ " image_anchor="top" >}}
<a class="btn btn-lg btn-primary me-3 mb-4" href="docs/">
Learn More <i class="fas fa-arrow-alt-circle-right ms-2"></i>
</a>
<a class="btn btn-lg btn-secondary me-3 mb-4" href="project/download/">
Download <i class="fab fa-github ms-2 "></i>
</a>
<p class="lead mt-5">a data serialization system</p>
{{< 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">}}
<!-- Note: the number of feature blocks should be a multiple of 3 for optimal display -->

{{% 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 >}}

11 changes: 4 additions & 7 deletions doc/content/en/blog/releases/avro-1.12.0-released.md
Original file line number Diff line number Diff line change
@@ -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
---

<!--
Expand All @@ -27,10 +27,7 @@ date: 2023-09-22

The Apache Avro community is pleased to announce the release of Avro 1.12.0!

All signed release artifacts, signatures and verification instructions can
be found <a href="{{< relref "/project/download" >}}">here</a>

This release [addresses 39 Jira issues](https://issues.apache.org/jira/issues/?jql=project%3DAVRO%20AND%20fixVersion%3D1.11.3).
All signed release artifacts, signatures and verification instructions can be found <a href="{{< relref "/project/download" >}}">here</a>

## Changes

Expand Down
Loading

0 comments on commit fc4da5b

Please sign in to comment.