Skip to content

docs update for refs/heads/main #710

docs update for refs/heads/main

docs update for refs/heads/main #710

Workflow file for this run

name: build-site
on:
push:
branches:
- main
jobs:
import-generated:
runs-on: ubuntu-latest
if: github.ref != 'refs/heads/master'
steps:
- name: set git username
run: git config --global user.email "${{ secrets.NBDROID_EMAIL }}"
- name: set git email
run: git config --global user.name "${{ secrets.NBDROID_NAME }}"
- run: ls -la
- name: clone nosqlbench-build-docs
env:
NBDROID_NAME: ${{ secrets.NBDROID_NAME }}
NBDROID_TOKEN: ${{ secrets.NBDROID_TOKEN }}
run: |
git clone https://${{secrets.NBDROID_NAME}}:${{secrets.NBDROID_TOKEN}}@github.com/nosqlbench/nosqlbench-build-docs.git nosqlbench-build-docs
cd nosqlbench-build-docs
echo "files listing"
find .
git remote set-url origin https://${{secrets.NBDROID_NAME}}:${{secrets.NBDROID_TOKEN}}@github.com/nosqlbench/nosqlbench-build-docs.git
git remote -v
- name: 'Import Content'
run: |
set -x
cd nosqlbench-build-docs
./doimport.sh
- name: "commit imported changes"
env:
NBDROID_NAME: ${{ secrets.NBDROID_NAME }}
NBDROID_TOKEN: ${{ secrets.NBDROID_TOKEN }}
run: |
set -x
pwd
cd nosqlbench-build-docs
git add site
git add -u
CHANGES=$(git status --porcelain 2>/dev/null| wc -l)
echo "found $CHANGES to push for doc updates"
if (( $CHANGES > 0 ))
then
git commit -m"docs update for $GITHUB_REF"
git push
fi
build-site:
needs: import-generated
runs-on: ubuntu-latest
if: github.ref != 'refs/heads/master'
steps:
- name: 'Checkout'
uses: actions/checkout@master
- name: 'set CNAME'
run: |
echo "builddocs.nosqlbench.io" > site/static/CNAME
- name: 'Build and Deploy Static Site'
uses: shalzz/zola-deploy-action@master
env:
BUILD_DIR: ./site
GITHUB_TOKEN: ${{ secrets.NBDROID_TOKEN }}