diff --git a/.github/workflows/algolia-index.yaml b/.github/workflows/algolia-index.yaml deleted file mode 100644 index 608c376..0000000 --- a/.github/workflows/algolia-index.yaml +++ /dev/null @@ -1,52 +0,0 @@ -name: Algolia Indexing - -on: - workflow_dispatch: - # This workflow cannot be chained from the deploy-main.yaml workflow, - # because it will trigger the indexing immediately after the production branch - # is updated, which is before the Vercel production deployment is finished. - # So the current approach is to run this workflow regularly, and trigger - # indexing if there is any recent commits in the production branch. - schedule: - - cron: "3 */6 * * *" - -jobs: - trigger-algolia-crawl: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - ref: production - fetch-depth: 0 - - - name: Check for recent commits - if: github.event_name == 'schedule' - id: check_commits - run: | - # Get timestamp from 6 hours ago - six_hours_ago=$(date -u -d '6 hours ago' +%s) - - # Get the timestamp of the last commit - last_commit_time=$(git log -1 --format=%ct) - - # Compare timestamps - if [ $last_commit_time -gt $six_hours_ago ]; then - echo "has_recent_commits=true" >> $GITHUB_OUTPUT - echo "Found commits in the last 6 hours" - else - echo "has_recent_commits=false" >> $GITHUB_OUTPUT - echo "No commits in the last 6 hours" - fi - - - name: Trigger Algolia crawler - if: github.event_name == 'workflow_dispatch' || steps.check_commits.outputs.has_recent_commits == 'true' - uses: cssnr/algolia-crawler-action@v2 - with: - # Find crawler ID by clicking into the crawler this page: - # https://dashboard.algolia.com/apps/NU3OWTAZ9V/crawler/crawlers - crawler_id: ${{ secrets.ALGOLIA_CRAWLER_ID }} - # Get crawler user ID and API key from this page: - # https://dashboard.algolia.com/apps/NU3OWTAZ9V/crawler/settings - crawler_user_id: ${{ secrets.ALGOLIA_CRAWLER_USER_ID }} - crawler_api_key: ${{ secrets.ALGOLIA_CRAWLER_API_KEY }} diff --git a/.github/workflows/deploy-preview.yaml b/.github/workflows/deploy-preview.yaml deleted file mode 100644 index a6ebc33..0000000 --- a/.github/workflows/deploy-preview.yaml +++ /dev/null @@ -1,29 +0,0 @@ -name: Preview - -on: - push: - branches: - - main - pull_request: - branches: - - main - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref || github.run_id }} - cancel-in-progress: false - -env: - NEXT_TELEMETRY_DISABLED: 1 - HUSKY: 0 - CI: 1 - -jobs: - deploy-preview: - runs-on: ubuntu-latest - steps: - - name: Trigger mintlify preview deployment - run: | - curl --request POST \ - --url https://api.mintlify.com/v1/project/update/${{ secrets.MINTLIFY_PROJECT_ID }} \ - --header 'Authorization: Bearer ${{ secrets.MINTLIFY_API_TOKEN }}' diff --git a/README.md b/README.md index e1a4c48..e287eba 100644 --- a/README.md +++ b/README.md @@ -1,55 +1,8 @@ # Liquid Documentation -## Docs - -| Doc | Directory | Sidebar | -| --- | --- | --- | -| LFM | [lfm](./lfm) | [`sidebarsLfm.ts`](./sidebarsLfm.ts) | -| LEAP | [leap](./leap) | [`sidebarsLeap.ts`](./sidebarsLeap.ts) | -| Examples | [examples](./examples) | [`sidebarsExamples.ts`](./sidebarsExamples.ts) | - -## Local Development - -```sh -npm install -npm run dev -``` - -The local server will be available at `http://localhost:3000`. - -To test the build: - -```sh -npm run build -npm run serve -``` - -The `npm run serve` script does not support hot loading. - -## Search - -Search is enabled by Algolia: - -- Algolia crawler runs regularly on certain days within a week configured in the [crawler](https://dashboard.algolia.com/apps/NU3OWTAZ9V/crawler/crawlers). -- It also runs periodically through the [`algolia-index.yaml`](./.github/workflows/algolia-index.yaml) GitHub action, when there are changes in the `production` branch. - ## Link check -There are two link checks in this repo: - -- Docusaurus will throw error for any broken as configured by `onBrokenLinks` in [`docusaurus.config.ts`](./docusaurus.config.ts). If the broken build is annoying for preview, change it to `warn`. -- The [`check.yaml`](./.github/workflows/check.yaml) workflow has a `check-link` job that examine markdown links. Customize the config in [`link-check.json`](./link-check.json). If a link cannot be accessed (e.g. Github private repo), add the URL pattern to the `ignorePatterns` array. - -## Deployment - -The deployment is automated through Vercel. - -| Branch | Domain | -| ------------ | ------------------------------- | -| `main` | https://docs-staging.liquid.ai/ | -| `production` | https://docs.liquid.ai/ | - -To promote the `main` branch to `production`, run the [`deploy-main.yaml`](https://github.com/Liquid4All/docs/actions/workflows/deploy-main.yaml) GitHub action, which will automatically fast-forward the `production` branch to match `main`. +The [`check.yaml`](./.github/workflows/check.yaml) workflow has a `check-link` job that examine markdown links. Customize the config in [`link-check.json`](./link-check.json). If a link cannot be accessed (e.g. Github private repo), add the URL pattern to the `ignorePatterns` array. ## LICENSE