Skip to content

Commit

Permalink
ci: moving docs to github action too
Browse files Browse the repository at this point in the history
  • Loading branch information
robinbourianes-kalisio committed Jun 14, 2024
1 parent b0c8a62 commit cbb79dc
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,15 @@ jobs:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: bash scripts/build_container.sh "${{ github.event.head_commit.message }}"

# build_doc:
# if: ${{ contains(github.event.head_commit.message, 'doc') }}
# runs-on: ubuntu-22.04
# steps:
# - name: Checkout repo
# uses: actions/checkout@v4
build_docs:
if: ${{ contains(github.event.head_commit.message, 'doc') }}
runs-on: ubuntu-22.04
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Build docs
run: bash scripts/build_docs.sh
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./docs/.vuepress/dist
8 changes: 8 additions & 0 deletions scripts/build_docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

cd docs && yarn install && yarn build
RESULT_CODE=$?
if [ $RESULT_CODE -ne 0 ]; then
echo "Doc generation failed [error: $RESULT_CODE]"
exit 1
fi

0 comments on commit cbb79dc

Please sign in to comment.