fix isAsyncIterable type-guard example (#1415) #1
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: Algolia Publish | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
algolia-push-records: | |
name: Push new records if changes | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
- name: Use Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 17 | |
cache: 'yarn' | |
- name: Install Dependencies | |
run: yarn --ignore-engines | |
- name: Build Packages | |
run: yarn build | |
- name: Typecheck | |
run: yarn workspace website build | |
- name: Algolia push | |
run: yarn workspace website algolia-sync | |
env: | |
ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }} | |
ALGOLIA_ADMIN_API_KEY: ${{ secrets.ALGOLIA_ADMIN_API_KEY }} | |
ALGOLIA_INDEX_NAME: ${{ secrets.ALGOLIA_INDEX_NAME }} | |
SITE_URL: https://www.envelop.dev/ | |
- name: Prettier | |
run: yarn prettier | |
- name: Compare | |
run: git diff website/algolia-lockfile.json | |
- name: Diff to file | |
if: always() | |
id: diff_result | |
run: | | |
OUTPUT=$(git diff website/algolia-lockfile.json) | |
OUTPUT="${OUTPUT//'%'/'%25'}" | |
OUTPUT="${OUTPUT//$'\n'/'%0A'}" | |
OUTPUT="${OUTPUT//$'\r'/'%0D'}" | |
echo "::set-output name=result::$OUTPUT" | |
- name: Commit algolia-lockfile.json | |
if: always() && contains(steps.diff_result.outputs.result, 'diff') | |
uses: EndBug/add-and-commit@v9 | |
with: | |
commit: website/algolia-lockfile.json | |
message: Update algolia-lockfile.json | |
default_author: github_actions |