This is an automated email from the ASF dual-hosted git repository.
eolivelli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git
The following commit(s) were added to refs/heads/master by this push:
new 3c40d4a [website] fix GITHUB_TOKEN used for deployment (#3125)
3c40d4a is described below
commit 3c40d4ac0db5c55b3cd029d316a91d236156a43c
Author: Nicolò Boschi <[email protected]>
AuthorDate: Fri Mar 18 11:43:42 2022 +0100
[website] fix GITHUB_TOKEN used for deployment (#3125)
---
.github/workflows/website-deploy.yaml | 2 ++
.github/workflows/website-staging-deploy.yaml | 2 ++
site/scripts/publish-website.sh | 2 +-
site3/website/scripts/publish-website.sh | 2 +-
4 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/website-deploy.yaml
b/.github/workflows/website-deploy.yaml
index b6f9825..d97e4c8 100644
--- a/.github/workflows/website-deploy.yaml
+++ b/.github/workflows/website-deploy.yaml
@@ -49,6 +49,8 @@ jobs:
ruby-version: 2.6.9
- name: publish
+ env:
+ GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: |
#!/bin/bash
set -e
diff --git a/.github/workflows/website-staging-deploy.yaml
b/.github/workflows/website-staging-deploy.yaml
index 92e55be..27168b2 100644
--- a/.github/workflows/website-staging-deploy.yaml
+++ b/.github/workflows/website-staging-deploy.yaml
@@ -55,6 +55,8 @@ jobs:
run: npm install -g yarn
- name: Publish
+ env:
+ GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: |
./site3/website/scripts/build-website.sh
./site3/website/scripts/publish-website.sh
\ No newline at end of file
diff --git a/site/scripts/publish-website.sh b/site/scripts/publish-website.sh
index 2f6b3c6..d032929 100755
--- a/site/scripts/publish-website.sh
+++ b/site/scripts/publish-website.sh
@@ -32,7 +32,7 @@ echo "ORIGIN_REPO: $ORIGIN_REPO"
cd $TMP_DIR
# clone the remote repo
- git clone --depth 1 -b asf-site "https://$GH_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 "[email protected]"
# copy the apache generated dir
diff --git a/site3/website/scripts/publish-website.sh
b/site3/website/scripts/publish-website.sh
index aeada43..a13abe0 100755
--- a/site3/website/scripts/publish-website.sh
+++ b/site3/website/scripts/publish-website.sh
@@ -32,7 +32,7 @@ TMP_DIR=/tmp/bookkeeper-site
cd $TMP_DIR
# clone the remote repo
- git clone --depth 1 -b asf-staging "https://$GH_TOKEN@$ORIGIN_REPO" .
+ git clone --depth 1 -b asf-staging
"https://site-updater:${GITHUB_TOKEN}@$ORIGIN_REPO" .
git config user.name "Apache BookKeeper Site Updater"
git config user.email "[email protected]"
# copy the apache generated dir