docs: adjust graphrag doc (#74) #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and deploy docs | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'docs/**' | |
release: | |
types: [published] | |
workflow_dispatch: | |
permissions: | |
contents: read | |
pages: write | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
if: github.event_name != 'pull_request' | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_TOKEN }} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
file: ./docs/Dockerfile-deploy | |
platforms: linux/amd64 | |
push: true | |
tags: khulnasoft/gptdb-docs:${{ github.ref_name }},khulnasoft/gptdb-docs:latest | |
- name: Deploy documentation | |
run: | | |
mkdir -p gh-pages | |
cp -r docs/* gh-pages/ | |
cd gh-pages | |
git init | |
git config user.email "[email protected]" | |
git config user.name "GitHub Actions" | |
git remote add origin https://github.com/${{ github.repository }}.git | |
git checkout -b gh-pages | |
git add . | |
git commit -m "Deploy documentation" | |
git push --force https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git gh-pages | |
env: | |
GITHUB_PAGES: true |