Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE #2477] Update jekyll-gh-pages.yml action #2478

Merged
merged 1 commit into from
Feb 1, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 17 additions & 12 deletions .github/workflows/jekyll-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,22 @@ jobs:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

- name: Algolia crawler creation and crawl
uses: algolia/algoliasearch-crawler-github-actions@v1.0.10
id: algolia_crawler
with: #https://github.com/marketplace/actions/algolia-crawler-automatic-crawl
crawler-user-id: ${{ secrets.CRAWLER_USER_ID }}
crawler-api-key: ${{ secrets.CRAWLER_API_KEY }}
algolia-app-id: ${{ secrets.ALGOLIA_APP_ID }}
algolia-api-key: ${{ secrets.ALGOLIA_API_KEY }}
crawler-name: 'rocketmq-rust.ljbmxsm.com_A7P4XEL1X0'
site-url: 'https://rocketmq-rust.ljbmxsm.com'
override-config: true
- name: Update Algolia index
working-directory: rocketmq-doc/
run: bundle exec jekyll algolia push
env:
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
continue-on-error: true
Comment on lines +55 to +60
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

⚠️ Potential issue

Misplaced continue-on-error flag in the "Update Algolia index" step.

The continue-on-error: true property is placed within the env block (lines 59-60). In GitHub Actions, this flag should be a step-level property (at the same level as run and env) so that the workflow can properly continue even if the step fails.

Suggested diff:

-        env:
-          ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
-          continue-on-error: true
+        continue-on-error: true
+        env:
+          ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Update Algolia index
working-directory: rocketmq-doc/
run: bundle exec jekyll algolia push
env:
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
continue-on-error: true
- name: Update Algolia index
working-directory: rocketmq-doc/
run: bundle exec jekyll algolia push
continue-on-error: true
env:
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}

# - name: Algolia crawler creation and crawl
# uses: algolia/algoliasearch-crawler-github-actions@v1.0.10
# id: algolia_crawler
# with: #https://github.com/marketplace/actions/algolia-crawler-automatic-crawl
# crawler-user-id: ${{ secrets.CRAWLER_USER_ID }}
# crawler-api-key: ${{ secrets.CRAWLER_API_KEY }}
# algolia-app-id: ${{ secrets.ALGOLIA_APP_ID }}
# algolia-api-key: ${{ secrets.ALGOLIA_API_KEY }}
# crawler-name: 'rocketmq-rust.ljbmxsm.com_A7P4XEL1X0'
# site-url: 'https://rocketmq-rust.ljbmxsm.com'
# override-config: true


Loading