Skip to content

Merge pull request #120 from nevermined-io/feat/api_key #45

Merge pull request #120 from nevermined-io/feat/api_key

Merge pull request #120 from nevermined-io/feat/api_key #45

Workflow file for this run

name: Push documentation to docs repo
on:
workflow_dispatch:
push:
tags:
- v*
jobs:
build-and-push-to-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v1
with:
node-version: '18'
- name: Install dependencies
run: |
yarn install --ignore-engines
yarn run generate-doc
- name: Install envsubst
run: |
sudo apt update
sudo apt install -y gettext
- name: Download push-to-docs script template
run: |
curl -o push-to-docs.sh.template https://raw.githubusercontent.com/nevermined-io/reusable-workflows/main/scripts/push-to-docs.sh
- name: Replace env vars in push-to-docs script
env:
BRANCH_TO_CLONE: main
REPO_TO_PUSH: docs
PATH_TO_COPY: docs/
PATH_TO_PUSH: docs/cli
REPOSITORY_NAME: ${{ github.repository }}
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
run: |
export REPOSITORY_NAME=$(echo $REPOSITORY_NAME | awk -F '/' '{print $2}')
envsubst < push-to-docs.sh.template > push-to-docs.sh
env > env.file
chmod +x push-to-docs.sh
./push-to-docs.sh