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

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


The following commit(s) were added to refs/heads/main by this push:
     new 90d84627 Remove mandatory staging site
90d84627 is described below

commit 90d84627aecbc7974d39431d8e0dddb7e6e13287
Author: Christopher Tubbs <ctubb...@apache.org>
AuthorDate: Wed Apr 26 14:35:30 2023 -0400

    Remove mandatory staging site
    
    Publish directly to asf-site by default, as per consensus on
    https://lists.apache.org/thread/0ts1hmgyw0jt4g3b8063fry7bkvwgo3v
---
 .asf.yaml           |  2 +-
 README.md           | 48 ++----------------------------------------------
 _scripts/publish.sh | 36 ------------------------------------
 3 files changed, 3 insertions(+), 83 deletions(-)

diff --git a/.asf.yaml b/.asf.yaml
index 77f5bfa5..0a26bdef 100644
--- a/.asf.yaml
+++ b/.asf.yaml
@@ -41,5 +41,5 @@ publish:
 
 jekyll:
   whoami: main
-  target: asf-staging
+  target: asf-site
 
diff --git a/README.md b/README.md
index 65e2cf45..6cbff2e3 100644
--- a/README.md
+++ b/README.md
@@ -154,56 +154,12 @@ docker run -v "$PWD":/mnt/workdir -it webdev /bin/bash
 
 ## Publishing
 
-### Automatic Staging
-
 Changes pushed to our `main` branch will automatically trigger Jekyll to
-build our site from that branch and push the result to our `asf-staging`
-branch, where they will be served on [our default staging site][staging].
-
-### Publishing Staging to Production
-
-First, add our repository as a remote in your local clone, if you haven't
-already done so (these commands assume the name of that remote is 'upstream').
-
-Example:
-
-```bash
-git clone https://github.com/<yourusername>/accumulo-website
-cd accumulo-website
-git remote add upstream https://github.com/apache/accumulo-website
-```
-
-Next, publish the staging site to production by updating the `asf-site` branch
-to match the contents in the `asf-staging` branch:
-
-```bash
-# Step 0: stay in main branch; you never need to switch
-git checkout main
-
-# Step 1: update your upstream remote
-git remote update upstream
-
-# Step 2: push upstream/asf-staging to upstream/asf-site
-# run next command with --dry-run first to see what it will do without making 
changes
-git push upstream upstream/asf-staging:asf-site
-```
-
-A convenience script can be found that performs these steps for you, after
-asking which remote you want to use. It is located in the `main` branch at
-`_scripts/publish.sh`
-
-Note that Step 2 should always be a fast-forward merge. That is, there should
-never be any reason to force-push it if everything is done correctly. If extra
-commits are ever added to `asf-site` that are not present in `asf-staging`,
-then those branches will need to be sync'd back up in order to continue
-avoiding force pushes.
-
-The final site can be viewed [here][production].
-
+build our site from that branch and push the result to our `asf-site`
+branch, where they will be served on [our production site][production].
 
 [Bundler]: https://bundler.io/
 [Jekyll]: https://jekyllrb.com/
 [Liquid]: https://jekyllrb.com/docs/liquid/
 [kramdown]: https://kramdown.gettalong.org/
 [production]: https://accumulo.apache.org
-[staging]: https://accumulo.staged.apache.org
diff --git a/_scripts/publish.sh b/_scripts/publish.sh
deleted file mode 100755
index d1df9904..00000000
--- a/_scripts/publish.sh
+++ /dev/null
@@ -1,36 +0,0 @@
-#! /usr/bin/env bash
-
-# catch most errors
-set -eE
-trap 'echo "[ERROR] Error occurred at $BASH_SOURCE:$LINENO command: 
$BASH_COMMAND"' ERR
-
-function publish_main() {
-  local src='asf-staging' dst='asf-site' r yn remotes=()
-  for r in $(git remote); do
-    remotes+=("$r ($(git config "remote.$r.url"))")
-  done
-  echo 'Select a remote:'
-  select r in "${remotes[@]}"; do
-    if [[ -n $r ]]; then
-      r="${r%% *}"
-      git remote update --prune "${r:?}"
-      echo 'Updating would perform the following (if anything):'
-      git push --dry-run "$r" "$r/$src:refs/heads/$dst"
-      if [[ "$(git rev-parse "remotes/$r/$src")" == "$(git rev-parse 
"remotes/$r/$dst")" ]]; then
-        return 0
-      fi
-      read -r -p "Are you sure you want to publish '$r/$src' to '$r/$dst'? " yn
-      if [[ $yn =~ ^[yY]$|^[yY][eE][sS]$ ]]; then
-        git push "$r" "$r/$src:refs/heads/$dst"
-      else
-        echo "You did not answer 'y' or 'yes', so no updates were made."
-      fi
-      return 0
-    else
-      echo 'ERROR - Invalid selection'
-      return 1
-    fi
-  done
-}
-
-publish_main "$@" || exit 1

Reply via email to