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/fluo-website.git
The following commit(s) were added to refs/heads/main by this push:
new 9b09f11 Update website (#223)
9b09f11 is described below
commit 9b09f11af55e62cf2c1a0262ecd714ba7dec5b62
Author: Christopher Tubbs <[email protected]>
AuthorDate: Wed Aug 21 18:34:35 2024 -0400
Update website (#223)
* Simplify publishing workflow by skipping staging site
* Update GitHub Actions and use modern way of caching bundler gems
* Update gems
---
.asf.yaml | 2 +-
.github/workflows/jekyll.yaml | 12 ++---------
Gemfile | 2 ++
Gemfile.lock | 19 +++++++++--------
README.md | 48 ++-----------------------------------------
_scripts/publish.sh | 36 --------------------------------
6 files changed, 17 insertions(+), 102 deletions(-)
diff --git a/.asf.yaml b/.asf.yaml
index 1593a2f..8d1595e 100644
--- a/.asf.yaml
+++ b/.asf.yaml
@@ -42,5 +42,5 @@ publish:
jekyll:
whoami: main
- target: asf-staging
+ target: asf-site
diff --git a/.github/workflows/jekyll.yaml b/.github/workflows/jekyll.yaml
index 34ab246..c3c4464 100644
--- a/.github/workflows/jekyll.yaml
+++ b/.github/workflows/jekyll.yaml
@@ -30,21 +30,13 @@ jobs:
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2.2
- - name: Cache gems
- uses: actions/cache@v3
- with:
- path: ~/vendor/bundle
- key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
- restore-keys: ${{ runner.os }}-gem
+ bundler-cache: true
- name: Test site build
run: |
ruby --version
- gem install bundler
- bundle config path ~/vendor/bundle
- bundle install --jobs 4 --retry 3
bundle exec jekyll build
diff --git a/Gemfile b/Gemfile
index ecded23..9387815 100644
--- a/Gemfile
+++ b/Gemfile
@@ -2,3 +2,5 @@ ruby '>=2.7'
source 'https://rubygems.org'
gem 'jekyll', '>= 4.2.0'
gem 'jekyll-redirect-from', '>= 0.16.0'
+
+gem "webrick", "~> 1.7"
diff --git a/Gemfile.lock b/Gemfile.lock
index 7373f40..4ffdc77 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,18 +1,18 @@
GEM
remote: https://rubygems.org/
specs:
- addressable (2.8.6)
- public_suffix (>= 2.0.2, < 6.0)
+ addressable (2.8.7)
+ public_suffix (>= 2.0.2, < 7.0)
bigdecimal (3.1.8)
colorator (1.1.0)
- concurrent-ruby (1.3.1)
+ concurrent-ruby (1.3.3)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
eventmachine (1.2.7)
ffi (1.17.0)
forwardable-extended (2.6.0)
- google-protobuf (4.27.0)
+ google-protobuf (4.27.2)
bigdecimal
rake (>= 13)
http_parser.rb (0.8.0)
@@ -51,16 +51,16 @@ GEM
mercenary (0.4.0)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
- public_suffix (5.0.5)
+ public_suffix (6.0.0)
rake (13.2.1)
rb-fsevent (0.11.2)
rb-inotify (0.11.1)
ffi (~> 1.0)
- rexml (3.2.8)
- strscan (>= 3.0.9)
- rouge (4.2.1)
+ rexml (3.3.1)
+ strscan
+ rouge (4.3.0)
safe_yaml (1.0.5)
- sass-embedded (1.77.4)
+ sass-embedded (1.77.5)
google-protobuf (>= 3.25, < 5.0)
rake (>= 13)
strscan (3.1.0)
@@ -75,6 +75,7 @@ PLATFORMS
DEPENDENCIES
jekyll (>= 4.2.0)
jekyll-redirect-from (>= 0.16.0)
+ webrick (~> 1.7)
RUBY VERSION
ruby 2.7.1p83
diff --git a/README.md b/README.md
index 75c2552..aa4e1e7 100644
--- a/README.md
+++ b/README.md
@@ -68,56 +68,12 @@ replace any reference to `fluo` with `recipes`.
## 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>/fluo-website
-cd fluo-website
-git remote add upstream https://github.com/apache/fluo-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].
[Jekyll]: https://jekyllrb.com/
[production]: https://fluo.apache.org
-[staging]: https://fluo.staged.apache.org
[ti]: https://github.com/apache/fluo-website/workflows/CI/badge.svg
[tl]: https://github.com/apache/fluo-website/actions
[li]: http://img.shields.io/badge/license-ASL-blue.svg
diff --git a/_scripts/publish.sh b/_scripts/publish.sh
deleted file mode 100755
index d1df990..0000000
--- 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