Skip to content

fix: replace printStackTrace() calls with proper logging (#7073) #132

fix: replace printStackTrace() calls with proper logging (#7073)

fix: replace printStackTrace() calls with proper logging (#7073) #132

Workflow file for this run

name: Publish Documentation
on:
workflow_dispatch: {}
push:
paths:
- 'docs/**'
branches: [ main ]
jobs:
publish-docs:
if: github.repository_owner == 'Apicurio'
runs-on: ubuntu-22.04
steps:
- name: Apicurio Website Checkout
run: |
mkdir website
cd website
git init
git config --global user.name "apicurio-ci"
git config --global user.email "[email protected]"
git remote add origin "https://apicurio-ci:${{ secrets.ACCESS_TOKEN }}@github.com/Apicurio/apicurio.github.io.git"
git fetch
git checkout main
git branch --set-upstream-to=origin/main
git pull
- name: Apicurio Registry Checkout
run: |
mkdir registry
cd registry
git init
git config --global user.name "apicurio-ci"
git config --global user.email "[email protected]"
git remote add origin "https://apicurio-ci:${{ secrets.ACCESS_TOKEN }}@github.com/Apicurio/apicurio-registry.git"
git fetch
git checkout main
git branch --set-upstream-to=origin/main
git pull
- name: Generate Documentation
run: |
cd registry/docs-playbook
./_build-all.sh
- name: Copy Documentation to Website
run: |
rm -rf website/registry/docs
cp -rf registry/docs-playbook/target/dist website/registry/docs
- name: Commit Documentation to Website
run: |
cd website
git add .
git commit -m "Automated Publishing of Documentation for Apicurio Registry"
git pull origin main
git push
- name: Slack Notification (Always)
if: always()
run: |
MESSAGE="'${{ github.workflow }}/${{ github.job }}' job completed with status: ${{ job.status }}"
REPO="${{ github.repository }}"
LINK="https://github.com/$REPO/actions/runs/${{ github.run_id }}"
PAYLOAD="{\"workflow\": \"${{ github.workflow }}\", \"status\": \"${{ job.status }}\", \"message\": \"$MESSAGE\", \"link\": \"$LINK\", \"repository\": \"$REPO\"}"
curl -X POST -H "Content-Type: application/json" -d "$PAYLOAD" ${{ secrets.SLACK_NOTIFICATION_WEBHOOK }}
- name: Slack Notification (Error)
if: failure()
run: |
MESSAGE="'${{ github.workflow }}/${{ github.job }}' job FAILED!"
REPO="${{ github.repository }}"
LINK="https://github.com/$REPO/actions/runs/${{ github.run_id }}"
PAYLOAD="{\"workflow\": \"${{ github.workflow }}\", \"status\": \"${{ job.status }}\", \"message\": \"$MESSAGE\", \"link\": \"$LINK\", \"repository\": \"$REPO\"}"
curl -X POST -H "Content-Type: application/json" -d "$PAYLOAD" ${{ secrets.SLACK_ERROR_WEBHOOK }}