Implement Mongo storage (#1261) #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docs | |
on: | |
push: | |
branches: [main] | |
paths: | |
- "docs/**" | |
pull_request: | |
branches: [main] | |
paths: | |
- "docs/**" | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Build docs | |
run: | | |
cd docs | |
yarn install | |
yarn build | |
yarn build:blog | |
deploy: | |
if: ${{ github.event_name == 'push' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Clone gluesql.org | |
run: git clone https://github.com/gluesql/gluesql.github.io.git && | |
cd gluesql.github.io && | |
git checkout gh-pages | |
- name: Build docs | |
run: | | |
cd docs | |
yarn install | |
yarn build | |
- name: Update docs/dev/ to gluesql.org | |
run: | | |
rm -rf gluesql.github.io/docs/dev | |
mkdir docs/dev/ | |
mv docs/build gluesql.github.io/docs/dev | |
- name: Prepare | |
run: | | |
git config --global user.email "taehoon.moon@outlook.com" | |
git config --global user.name "Taehoon Moon (Bot)" | |
- name: Commit and deploy | |
run: | | |
cd gluesql.github.io | |
git add docs/dev | |
git diff-index --quiet HEAD || ( | |
git commit -m "Update docs/dev" && | |
git push https://panarch:${{ secrets.GLUESQL_ORG }}@github.com/gluesql/gluesql.github.io.git | |
) |