Skip to content

Commit

Permalink
wip: migration from Travis CI to GitHub Actions #149 [build doc]
Browse files Browse the repository at this point in the history
  • Loading branch information
tristan-greffe committed Dec 5, 2023
1 parent a45ddf1 commit fb49071
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 30 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/doc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

rm .postcssrc.js && cd docs && yarn install && yarn build
RESULT_CODE=$?
if [ $RESULT_CODE -ne 0 ]; then
echo "Doc generation failed [error: $RESULT_CODE]"
exit 1
fi
33 changes: 3 additions & 30 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ jobs:
with:
node-version: ${{ secrets.NODE_VERSION }}
- name: Build and deploy
run: |
ls -la
chmod +x ./.github/workflows/app.sh
./.github/workflows/app.sh
run: ./.github/workflows/app.sh
doc:
if: ${{ contains(github.event.head_commit.message, '[build doc]') }}
runs-on: ubuntu-latest
Expand All @@ -28,34 +25,10 @@ jobs:
with:
node-version: ${{ secrets.NODE_VERSION }}
- name: Build doc
run: rm .postcssrc.js && cd docs && yarn install && yarn build
run: ./.github/workflows/doc.sh
- name: Deploy doc to GitHub Pages
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: docs/.vitepress/dist
# jobs:
# app:
# if: ${{ !contains(github.event.head_commit.message, '[skip app]') }}
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Login to Docker Hub
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.DOCKER_USER }}
# password: ${{ secrets.DOCKER_PASSWORD }}
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v3
# - name: Build and push
# uses: docker/build-push-action@v5
# with:
# context: .
# file: ./Dockerfile
# push: true
# tags: ${{ secrets.DOCKER_USER }}/clockbox:latest

# doc:
# if: ${{ contains(github.event.head_commit.message, '[build doc]') }}
# runs-on: ubuntu-latest
FOLDER: docs/.vitepress/dist

0 comments on commit fb49071

Please sign in to comment.