Skip to content

docs: change place of mirrors on sidebar #553

docs: change place of mirrors on sidebar

docs: change place of mirrors on sidebar #553

Workflow file for this run

name: Deploy to Production
on:
push:
branches:
- master
pull_request:
branches: [main, master]
paths:
- "src/pages/**/*.mdx"
- "mdx-to-md-converter/**"
jobs:
generate-md:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-node@v3
with:
node-version: "20"
- name: Install dependencies
run: |
npm ci
cd mdx-to-md-converter && npm ci
- name: Generate MD files
env:
MY_BASE_URL: ${{ secrets.MY_BASE_URL }}
MY_API_KEY: ${{ secrets.MY_API_KEY }}
run: |
echo "Repairing missing MD files only (no full rebuild)..."
npm --prefix mdx-to-md-converter run pre-commit -- --repair-missing
- name: Verify no diffs (PR only)
if: ${{ github.event_name == 'pull_request' }}
run: |
git add -A
if ! git diff --cached --quiet; then
echo "Generated MD is out of date. Run 'npm run generate-llms' and commit the results." >&2
exit 1
fi
- name: Check for changes (push only)
if: ${{ github.event_name == 'push' }}
id: check_changes
run: |
git diff --quiet public/llms public/all-links-llms.txt || echo "has_changes=true" >> $GITHUB_OUTPUT
- name: Commit and push if changed (push only)
if: ${{ github.event_name == 'push' && steps.check_changes.outputs.has_changes == 'true' }}
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add public/llms public/all-links-llms.txt
git commit -m "chore: auto-generate MD files from MDX [skip ci]"
git push
deploy:
runs-on: ubuntu-latest
needs: generate-md
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- uses: actions/setup-node@v3
with:
node-version: "20"
- name: install-dependencies
run: npm ci
- name: update-liara
env:
LIARA_TOKEN: ${{ secrets.IRAN_API_TOKEN }}
MY_BASE_URL: ${{ secrets.MY_BASE_URL }}
MY_API_KEY: ${{ secrets.MY_API_KEY }}
run: |
npm i -g @liara/cli@7
liara deploy --app="g2-the-docs" --api-token="$LIARA_TOKEN" --platform=docker --port=80 --no-app-logs --build-arg="MY_BASE_URL=$MY_BASE_URL" --build-arg="MY_API_KEY=$MY_API_KEY"
- name: Sleep for 60 seconds
run: sleep 60
shell: bash
- name: search-liara
working-directory: ./indexer
env:
MEILI_PRIVATE_KEY: ${{ secrets.MEILI_PRIVATE_KEY }}
MEILI_ROOT_URL: ${{ secrets.MEILI_ROOT_URL }}
run: |
npm i
npm run start