-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'refs/heads/main' into add-waf-resource
- Loading branch information
Showing
355 changed files
with
6,669 additions
and
7,873 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"nextjs-website": major | ||
--- | ||
|
||
Add whatsNew section to Overview page |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"infrastructure": minor | ||
--- | ||
|
||
Added docs redirect infrastructure |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"nextjs-website": major | ||
--- | ||
|
||
Add release note page to product section |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
--- | ||
name: chatbot | ||
description: Recreate Chatbot LLamaindex Vector Index | ||
|
||
inputs: | ||
aws_region: | ||
description: 'The AWS region selected' | ||
required: false | ||
default: 'eu-south-1' | ||
chatbot_lambda_name: | ||
description: the name of the chatbot lambda function | ||
required: true | ||
default: '' | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Setup Python | ||
uses: kishaningithub/setup-python-amazon-linux@282d998c8f2c4678ac4f872e4dc3b7d167b59fa7 # v1 | ||
with: | ||
python-version: '3.12' | ||
|
||
- name: Install poetry with pip | ||
shell: bash | ||
run: | | ||
pip install poetry | ||
- name: Install python libraries | ||
shell: bash | ||
run: | | ||
cd apps/chatbot | ||
poetry config virtualenvs.create false | ||
poetry install --only main --no-interaction | ||
# - name: Run tests | ||
# run: | | ||
# cd apps/chatbot | ||
# poetry run pytest | ||
# coverage report | ||
# | ||
|
||
- name: Create Vector Index | ||
shell: bash | ||
run: | | ||
cd apps/chatbot | ||
PYTHONPATH=. CHB_DOCUMENTATION_DIR=${{ github.workspace }}/apps/nextjs-website/out poetry run python src/modules/create_vector_index.py --params config/params.yaml | ||
- name: Restart backend lambda function | ||
env: | ||
CHATBOT_LAMBDA_NAME: ${{ inputs.chatbot_lambda_name }} | ||
shell: bash | ||
run: | | ||
aws lambda update-function-code --function-name "${{ env.CHATBOT_LAMBDA_NAME }}" --image-uri $(aws lambda get-function --function-name "${{ env.CHATBOT_LAMBDA_NAME }}" --query 'Code.ImageUri' --output text) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,9 @@ inputs: | |
upload_path: | ||
description: 'The path where the report should be uploaded' | ||
required: true | ||
environment: | ||
description: 'The environment where the report should be uploaded' | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
|
@@ -20,10 +23,11 @@ runs: | |
run: npx -p [email protected] report | ||
|
||
- name: Upload bundle | ||
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 | ||
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 | ||
with: | ||
name: bundle | ||
name: bundle-${{ inputs.environment }} | ||
path: ${{ inputs.upload_path }} | ||
include-hidden-files: true | ||
|
||
- name: Download base branch bundle stats | ||
id: base-branch-stats | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
--- | ||
name: Chatbot Reindex | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
branches: | ||
- 'main' | ||
workflow_dispatch: | ||
inputs: | ||
environment: | ||
description: 'The environment used as target' | ||
type: choice | ||
required: true | ||
default: dev | ||
options: | ||
- dev | ||
- prod | ||
|
||
# Allows external webhook trigger | ||
repository_dispatch: | ||
types: | ||
- webhook | ||
|
||
# These permissions are needed to interact with GitHub's OIDC Token endpoint. | ||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
jobs: | ||
|
||
cd_deploy: | ||
name: Llama reindex (on ${{ matrix.environment }}) | ||
# Trigger when the PR is merged or on a webhook (e.g. trigger deploy from CMS) | ||
if: (github.event_name == 'pull_request' && github.event.pull_request.merged == true) || github.event_name == 'repository_dispatch' | ||
runs-on: codebuild-${{ matrix.environment }}-github-runner-${{ github.run_id }}-${{ github.run_attempt }} | ||
strategy: | ||
matrix: | ||
environment: ['dev'] | ||
fail-fast: false | ||
|
||
environment: ${{ matrix.environment }} | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ matrix.environment }} | ||
cancel-in-progress: false | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab | ||
|
||
- name: Increase action disk space | ||
uses: ./.github/actions/increase-disk-space | ||
|
||
- name: Setup Node.JS | ||
uses: ./.github/actions/setup-node | ||
|
||
- name: Install dependencies | ||
shell: bash | ||
run: npm ci --audit=false --fund=false | ||
|
||
- name: Compile packages | ||
shell: bash | ||
run: npm run compile | ||
|
||
- name: Build NextJS Website | ||
uses: ./.github/actions/build-nextjs-website | ||
with: | ||
path_to_gitbook_docs: ${{ github.workspace }}/apps/nextjs-website/docs | ||
cookie_domain_script: ${{ secrets.COOKIE_DOMAIN_SCRIPT }} | ||
allow_crawler: ${{ vars.ALLOW_CRAWLER }} | ||
cognito_user_pool_id: ${{ secrets.NEXT_PUBLIC_COGNITO_USER_POOL_ID }} | ||
cognito_identity_pool_id: ${{ secrets.NEXT_PUBLIC_COGNITO_IDENTITY_POOL_ID }} | ||
cognito_app_client_id: ${{ secrets.NEXT_PUBLIC_COGNITO_USER_POOL_WEB_CLIENT_ID }} | ||
chatbot_host: ${{ vars.NEXT_PUBLIC_CHATBOT_HOST }} | ||
chat_max_history_messages: ${{ vars.NEXT_PUBLIC_CHAT_MAX_HISTORY_MESSAGES }} | ||
website_name: ${{ vars.NEXT_PUBLIC_WEBSITE_NAME }} | ||
organization_name: ${{ vars.NEXT_PUBLIC_ORGANIZATION_NAME }} | ||
organization_logo: ${{ vars.NEXT_PUBLIC_ORGANIZATION_LOGO }} | ||
organization_social_links: ${{ vars.NEXT_PUBLIC_ORGANIZATION_SOCIAL_LINKS }} | ||
chatbot_active: ${{ vars.NEXT_PUBLIC_CHATBOT_ACTIVE }} | ||
cognito_aws_region: 'eu-south-1' | ||
strapi_endpoint: ${{ vars.STRAPI_ENDPOINT }} | ||
strapi_api_token: ${{ secrets.STRAPI_API_TOKEN }} | ||
fetch_from_strapi: ${{ vars.FETCH_FROM_STRAPI }} | ||
|
||
- name: Chatbot Vector Index | ||
uses: ./.github/actions/chatbot | ||
with: | ||
chatbot_lambda_name: ${{ vars.CHATBOT_LAMBDA_NAME }} | ||
|
||
manual_deploy: | ||
name: Llama reindex (manual on ${{ inputs.environment }}) | ||
if: github.event_name == 'workflow_dispatch' | ||
runs-on: codebuild-${{ inputs.environment }}-github-runner-${{ github.run_id }}-${{ github.run_attempt }} | ||
environment: ${{ inputs.environment }} | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ inputs.environment }} | ||
cancel-in-progress: false | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab | ||
|
||
- name: Increase action disk space | ||
uses: ./.github/actions/increase-disk-space | ||
|
||
- name: Setup Node.JS | ||
uses: ./.github/actions/setup-node | ||
|
||
- name: Install dependencies | ||
shell: bash | ||
run: npm ci --audit=false --fund=false | ||
|
||
- name: Compile packages | ||
shell: bash | ||
run: npm run compile | ||
|
||
- name: Build NextJS Website | ||
uses: ./.github/actions/build-nextjs-website | ||
with: | ||
path_to_gitbook_docs: ${{ github.workspace }}/apps/nextjs-website/docs | ||
cookie_domain_script: ${{ secrets.COOKIE_DOMAIN_SCRIPT }} | ||
allow_crawler: ${{ vars.ALLOW_CRAWLER }} | ||
cognito_user_pool_id: ${{ secrets.NEXT_PUBLIC_COGNITO_USER_POOL_ID }} | ||
cognito_identity_pool_id: ${{ secrets.NEXT_PUBLIC_COGNITO_IDENTITY_POOL_ID }} | ||
cognito_app_client_id: ${{ secrets.NEXT_PUBLIC_COGNITO_USER_POOL_WEB_CLIENT_ID }} | ||
chatbot_host: ${{ vars.NEXT_PUBLIC_CHATBOT_HOST }} | ||
chat_max_history_messages: ${{ vars.NEXT_PUBLIC_CHAT_MAX_HISTORY_MESSAGES }} | ||
website_name: ${{ vars.NEXT_PUBLIC_WEBSITE_NAME }} | ||
organization_name: ${{ vars.NEXT_PUBLIC_ORGANIZATION_NAME }} | ||
organization_logo: ${{ vars.NEXT_PUBLIC_ORGANIZATION_LOGO }} | ||
organization_social_links: ${{ vars.NEXT_PUBLIC_ORGANIZATION_SOCIAL_LINKS }} | ||
chatbot_active: ${{ vars.NEXT_PUBLIC_CHATBOT_ACTIVE }} | ||
cognito_aws_region: 'eu-south-1' | ||
strapi_endpoint: ${{ vars.STRAPI_ENDPOINT }} | ||
strapi_api_token: ${{ secrets.STRAPI_API_TOKEN }} | ||
fetch_from_strapi: ${{ vars.FETCH_FROM_STRAPI }} | ||
|
||
- name: Chatbot Vector Index | ||
uses: ./.github/actions/chatbot | ||
with: | ||
chatbot_lambda_name: ${{ vars.CHATBOT_LAMBDA_NAME }} |
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
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
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
Oops, something went wrong.