Skip to content
Permalink
Browse files
[website] Make site3 the official website (deploy scripts - master) (#…
…3187)

* [website] Make site3 the official website

* fix action
  • Loading branch information
nicoloboschi committed Apr 14, 2022
1 parent f7579fd commit e937ae9a6838fd533c3973d6ae6c32d98b6619bd
Showing 4 changed files with 18 additions and 99 deletions.
@@ -24,11 +24,15 @@ on:
branches:
- master
paths:
- 'site/**'
- 'site3/**'
- '.github/workflows/website-deploy.yaml'

env:
DEPLOY_URL: "https://bookkeeper.apache.org/"

jobs:
build-website:
name: Build and publish website
name: Build and deploy the website
if: ${{ github.repository == 'apache/bookkeeper' }}
runs-on: ubuntu-latest
timeout-minutes: 180
@@ -42,22 +46,17 @@ jobs:
distribution: 'temurin'
java-version: 11


- name: Set up Ruby
uses: ruby/setup-ruby@v1
- name: Setup NodeJS
uses: actions/setup-node@v2
with:
ruby-version: 2.6.9
node-version: '14'

- name: Setup yarn
run: npm install -g yarn

- name: publish
- name: Publish
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: |
#!/bin/bash
set -e
sudo apt-get update
sudo apt-get install -y libxslt-dev libxml2-dev
cd site
make setup
make latest_javadoc
make apache
./scripts/publish-website.sh
./site3/website/scripts/build-website.sh
./site3/website/scripts/publish-website.sh
@@ -25,7 +25,6 @@ on:
- master
- branch-*
paths:
- 'site/**'
- 'site3/**'
- '.github/workflows/website-pr-validation.yaml'
workflow_dispatch:
@@ -44,23 +43,6 @@ jobs:
distribution: 'temurin'
java-version: 11


- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6.9

- name: Build Website
run: |
#!/bin/bash
set -e
sudo apt-get update
sudo apt-get install -y libxslt-dev libxml2-dev
cd site
make setup
make latest_javadoc
make apache
- name: Setup NodeJS
uses: actions/setup-node@v2
with:
@@ -69,6 +51,6 @@ jobs:
- name: Setup yarn
run: npm install -g yarn

- name: Build staging website
- name: Build website
run: |
./site3/website/scripts/build-website.sh

This file was deleted.

@@ -32,15 +32,15 @@ TMP_DIR=/tmp/bookkeeper-site
cd $TMP_DIR

# clone the remote repo
git clone --depth 1 -b asf-staging "https://site-updater:${GITHUB_TOKEN}@$ORIGIN_REPO" .
git clone --depth 1 -b asf-site "https://site-updater:${GITHUB_TOKEN}@$ORIGIN_REPO" .
git config user.name "Apache BookKeeper Site Updater"
git config user.email "dev@bookkeeper.apache.org"
# copy the apache generated dir
mkdir -p content
cp -r $ROOT_DIR/site3/website/build/* content

git add -A .
git diff-index --quiet HEAD || (git commit -m "Updated site at revision $REVISION" && git push -q origin HEAD:asf-staging)
git diff-index --quiet HEAD || (git commit -m "Updated site at revision $REVISION" && git push -q origin HEAD:asf-site)

rm -rf $TMP_DIR
)

0 comments on commit e937ae9

Please sign in to comment.