Skip to content

Commit

Permalink
Update push-to-docs workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jcortejoso authored Aug 5, 2022
1 parent b1b7ff7 commit 63cba06
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 10 deletions.
31 changes: 22 additions & 9 deletions .github/workflows/push-to-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- v*

jobs:
build-doc:
build-and-push-to-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -18,11 +18,24 @@ jobs:
run: |
yarn install --ignore-engines
yarn run generate-doc
push-to-docs:
needs: build-doc
uses: nevermined-io/reusable-workflows/.github/workflows/push-to-docs.yml@main
with:
path-to-push: docs/tools/cli
repo-to-push: nvm-docs
branch-to-clone: main
secrets: inherit
- 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: nvm-docs
PATH_TO_COPY: docs/
PATH_TO_PUSH: docs/tools/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
2 changes: 1 addition & 1 deletion docs/using-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ In this example we are using a public url, but with Nevermined you also could do

* Add multiple urls referring to multiple files
* Use a cid for referring a content is in IPFS or Filecoin
* Publish the url of a content that is not publicly available (for example on premise in your own server or in the cloud). You could protect that content running your own [Nevermined Gateway](/docs/architecture/components/gateway).
* Publish the url of a content that is not publicly available (for example on premise in your own server or in the cloud). You could protect that content running your own [Nevermined Gateway](/docs/architecture/components/gateway/gateway.md).

:::info

Expand Down

0 comments on commit 63cba06

Please sign in to comment.