Skip to content

Merge pull request #56 from microsoft/bug_fixes #18

Merge pull request #56 from microsoft/bug_fixes

Merge pull request #56 from microsoft/bug_fixes #18

Workflow file for this run

name: Build Docs
on:
push:
branches: [main]
jobs:
build-docs:
runs-on: ubuntu-latest
concurrency:
group: flowquery-docs-${{ github.ref_name }}
cancel-in-progress: false
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Install root dependencies
run: npm ci
- name: Install flowquery-app dependencies
working-directory: flowquery-app
run: npm ci
- name: Clean Vite output
run: rm -rf docs/assets docs/index.html
- name: Build docs app
working-directory: flowquery-app
run: npm run build
- name: Commit docs changes
env:
HUSKY: "0"
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add docs/
if git diff --staged --quiet; then
exit 0
fi
git commit -m "chore: rebuild docs [skip ci]"
for attempt in 1 2 3; do
git fetch origin main:refs/remotes/origin/main
if ! git rebase origin/main; then
git rebase --abort || true
elif git push origin HEAD:main; then
break
fi
if [ "$attempt" -eq 3 ]; then
echo "Failed to push docs rebuild after 3 attempts."
exit 1
fi
sleep 5
done