Skip to content

Merge pull request #516 from codenotary/doc/golang-sdk #36

Merge pull request #516 from codenotary/doc/golang-sdk

Merge pull request #516 from codenotary/doc/golang-sdk #36

name: Build and Deploy
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: create .env
run: |
cat <<EOF > .env
ALGOLIA_API_KEY=${{secrets.ALGOLIA_API_KEY}}
ALGOLIA_APP_ID=${{secrets.ALGOLIA_APP_ID}}
ALGOLIA_INDEX=immudb
ALGOLIA_WRIGHT_API_KEY=${{secrets.ALGOLIA_WRIGHT_API_KEY}}
EOF
- uses: actions/setup-node@v2
with:
node-version: "14.18.3"
cache: "npm"
- name: Node version
run: node --version
# cache node_modules
- name: Cache dependencies
uses: actions/cache@v2
id: node-modules-cache
with:
path: |
**/node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node_modules-
- name: Node dependencies
if: steps.node-modules-cache.outputs.cache-hit != 'true'
run: npm i -f
- name: Build
run: npm run build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
- name: Index algolia
run: npm run algolia:index