This is an automated email from the ASF dual-hosted git repository.
erose pushed a commit to branch HDDS-9225-website-v2
in repository https://gitbox.apache.org/repos/asf/ozone-site.git
The following commit(s) were added to refs/heads/HDDS-9225-website-v2 by this
push:
new 1ca9d00d HDDS-9926. Publish WIP website to staging branch (2/2) (#56)
1ca9d00d is described below
commit 1ca9d00d1369bda9d5b3c784f52eaccd653879e0
Author: Ethan Rose <[email protected]>
AuthorDate: Fri Dec 15 15:31:49 2023 -0800
HDDS-9926. Publish WIP website to staging branch (2/2) (#56)
---
.github/workflows/publish.yml | 62 +++++++++++++++++++++++++++++++++++++++++++
README.md | 4 ++-
2 files changed, 65 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
new file mode 100644
index 00000000..96f36dee
--- /dev/null
+++ b/.github/workflows/publish.yml
@@ -0,0 +1,62 @@
+# 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.
+
+# Build Ozone website v2 and commit it to a staging branch.
+# This will be picked up by configurations in .asf.yml to publish it to a
staging domain.
+name: "auto-publish-website-v2"
+
+on:
+ push:
+ branches:
+ # TODO update this to master when the new website is ready to be
published.
+ - HDDS-9225-website-v2
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ # Check out the website source in the current working directory.
+ - name: "Checkout source branch ${{ github.ref_name }}"
+ uses: actions/checkout@v3
+ with:
+ path: 'src'
+ - name: "Build website"
+ working-directory: 'src'
+ # Website source is mounted as volume, so the build output ends up in
./src/build outside of the container.
+ run: |
+ docker compose run site pnpm run build
+ - name: "Checkout publish branch"
+ uses: actions/checkout@v3
+ with:
+ path: 'publish'
+ # TODO update this to asf-site when the website is ready to be
published.
+ ref: 'asf-site-v2'
+ - name: "Commit changes"
+ working-directory: 'publish'
+ run: |
+ # Delete previous build from the branch, but preserve files with
necessary metadata.
+ mv README.md .asf.yaml .git /tmp
+ rm -rf $(ls -A)
+ mv /tmp/README.md /tmp/.asf.yaml /tmp/.git .
+
+ # Commit new build to the branch.
+ cp -R ../src/build/. .
+ git config --global user.name 'Github Actions'
+ git config --global user.email '[email protected]'
+ git add .
+ git commit -a -m "[auto] Apply changes from $GITHUB_REF_NAME
$GITHUB_SHA" || true
+ git push
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
\ No newline at end of file
diff --git a/README.md b/README.md
index 9c62a2e3..1ffea30e 100644
--- a/README.md
+++ b/README.md
@@ -16,7 +16,9 @@
Welcome to the development branch of the new and improved Apache Ozone
website. The new site is being built with [Docusaurus](https://docusaurus.io/).
See the [Docusaurus docs](https://docusaurus.io/docs) for details on working
with this framework.
-## Relevant Links
+You can preview the current state of the new website at
https://ozone-site-v2.staged.apache.org.
+
+## Context
- [HDDS-9225](https://issues.apache.org/jira/browse/HDDS-9225) is the parent
Jira tracking current tasks required to get the new website ready for
deployment.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]