Skip to content

Merge pull request #51 from theiiienrique/checklink-failing-for-some-… #17

Merge pull request #51 from theiiienrique/checklink-failing-for-some-…

Merge pull request #51 from theiiienrique/checklink-failing-for-some-… #17

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches:
- main
# repository_dispatch: # TODO: Configure repository_dispatch event in update-common.yml
# types:
# - update-common-package-complete
jobs:
build:
name: Build Docusaurus
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
cache: npm
- name: Install dependencies
run: npm ci
- name: Build website
run: npm run build
env:
INKEEP_API_KEY: ${{ secrets.INKEEP_API_KEY }}
INKEEP_INTEGRATION_ID: ${{ secrets.INKEEP_INTEGRATION_ID }}
INKEEP_ORGANIZATION_ID: ${{ secrets.INKEEP_ORGANIZATION_ID }}
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}
- name: Upload Build Artifact
uses: actions/upload-pages-artifact@v3
with:
path: build
deploy:
name: Deploy to GitHub Pages
needs: build
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
sync_inkeep:
name: Sync Content with Inkeep
runs-on: ubuntu-latest
needs: deploy
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check for changes
uses: dorny/paths-filter@v2
id: changes
with:
filters: |
docs:
- 'docs/**'
- name: Sync Sources
if: steps.changes.outputs.docs == 'true'
uses: inkeep/pr-commenter-action@v10
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
apiKey: ${{secrets.INKEEP_MANAGEMENT_API_KEY}}
sourceId: "clzbwybh100es8o71fr5bq0k5"