Skip to content
Merged
Show file tree
Hide file tree
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
11 changes: 11 additions & 0 deletions .github/actions/restore-artifacts/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,17 @@ runs:
path: clients/algoliasearch-client-javascript/packages/requester-node-http/

# JavaScript
- name: Download client-javascript-algoliasearch artifact
if: ${{ inputs.javascript == 'true' && inputs.type == 'all' }}
uses: actions/download-artifact@v3
with:
name: client-javascript-algoliasearch

- name: Unzip client-javascript-algoliasearch artifact
if: ${{ inputs.javascript == 'true' && inputs.type == 'all' }}
shell: bash
run: unzip -q -o client-javascript-algoliasearch.zip && rm client-javascript-algoliasearch.zip

- name: Download clients-javascript artifact
if: ${{ inputs.javascript == 'true' && inputs.type == 'all' }}
uses: actions/download-artifact@v3
Expand Down
21 changes: 16 additions & 5 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -288,12 +288,23 @@ jobs:
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
run: yarn cli build clients javascript algoliasearch

- name: Zip artifact before storing
run: zip -r -y client-javascript-algoliasearch.zip clients/algoliasearch-client-javascript/packages/algoliasearch/ -x "**/node_modules/**" "**/node_modules/.**" "clients/algoliasearch-client-javascript/.yarn/**"

- name: Store JavaScript 'algoliasearch' client
uses: actions/upload-artifact@v3
with:
if-no-files-found: error
name: client-javascript-algoliasearch
path: client-javascript-algoliasearch.zip

codegen:
runs-on: ubuntu-20.04
timeout-minutes: 10
needs:
- setup
- client_gen
- client_javascript_algoliasearch
if: |
always() &&
!contains(needs.*.result, 'cancelled') &&
Expand All @@ -305,11 +316,6 @@ jobs:
ref: ${{ github.event.pull_request.head.ref }}
token: ${{ secrets.TOKEN_GENERATE_BOT }}

- name: Setup
uses: ./.github/actions/setup
with:
type: minimal

- name: Download all artifacts
if: ${{ needs.setup.outputs.RUN_CODEGEN == 'true' }}
uses: ./.github/actions/restore-artifacts
Expand All @@ -319,6 +325,11 @@ jobs:
php: ${{ needs.setup.outputs.RUN_GEN_PHP }}
java: ${{ needs.setup.outputs.RUN_GEN_JAVA }}

- name: Setup
uses: ./.github/actions/setup
with:
type: minimal

- name: Push generated code
id: pushGeneratedCode
run: yarn workspace scripts pushGeneratedCode
Expand Down
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[build]
command="BUNDLE_WITH_DOC=true DOCKER=true yarn cli build specs all && yarn website:build"
publish="website/build"
ignore="git diff --quiet $COMMIT_REF $CACHED_COMMIT_REF -- website/ specs/"
ignore="bash ./scripts/website/netlify-ignore-build.sh"

[build.environment]
YARN_VERSION = "3.1.1"
7 changes: 7 additions & 0 deletions scripts/website/netlify-ignore-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This $BRANCH variable comes from the Netlify env
Copy link
Member Author

Choose a reason for hiding this comment

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

sorry for the bash script :( did not found a way to match both things

if [[ $BRANCH == chore/prepare-release-* ]] ;
then
exit 0
else
git diff --quiet $COMMIT_REF $CACHED_COMMIT_REF -- website/ specs/ && exit $?
fi