Merge pull request #253 from awslabs/dependabot/github_actions/action… #15
This file contains hidden or 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: Deploy docs site | |
| # Builds the Astro Starlight site under docs-site/ and publishes it to GitHub Pages. | |
| # Requires "Settings → Pages → Source: GitHub Actions" to be enabled on the repo. | |
| # | |
| # This workflow only runs in the upstream repository (awslabs/graphrag-toolkit). | |
| # To deploy docs from your fork: | |
| # 1. Enable GitHub Pages: Settings → Pages → Source → GitHub Actions | |
| # 2. Remove the 'if: github.repository == ...' conditions from both jobs below | |
| # 3. Push to your fork's main branch with changes in docs-site/ | |
| on: | |
| push: | |
| branches: [main, documentation-site] | |
| paths: | |
| - 'docs-site/**' | |
| - '.github/workflows/docs.yml' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| if: github.repository == 'awslabs/graphrag-toolkit' | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: docs-site | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| cache-dependency-path: docs-site/package-lock.json | |
| - run: npm ci | |
| - run: npm run build | |
| - uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: docs-site/dist | |
| deploy: | |
| needs: build | |
| if: github.repository == 'awslabs/graphrag-toolkit' | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - id: deployment | |
| uses: actions/deploy-pages@v5 |