Skip to content

docs update for refs/heads/main #137

docs update for refs/heads/main

docs update for refs/heads/main #137

Workflow file for this run

name: buildsite
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-preview-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-preview-docs.git nosqlbench-preview-docs
cd nosqlbench-preview-docs
echo "files listing"
find .
git remote set-url origin https://${{secrets.NBDROID_NAME}}:${{secrets.NBDROID_TOKEN}}@github.com/nosqlbench/nosqlbench-preview-docs.git
git remote -v
- name: 'Import Content'
run: |
set -x
cd nosqlbench-preview-docs
./doimport.sh
- name: "trust owned submodule"
run: |
git config --global --add safe.directory /github/workspace/site/themes/abridge_modified
- name: "commit imported changes"
env:
NBDROID_NAME: ${{ secrets.NBDROID_NAME }}
NBDROID_TOKEN: ${{ secrets.NBDROID_TOKEN }}
run: |
set -x
pwd
cd nosqlbench-preview-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 "previewdocs.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 }}