-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: updated workflows and add firebase deploy
- Loading branch information
Showing
9 changed files
with
145 additions
and
43 deletions.
There are no files selected for viewing
File renamed without changes.
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,60 @@ | ||
name: Deploy (Frontend) | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
# paths: | ||
# - 'frontend/src/**' | ||
# - 'shared/ts/**' | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'frontend/src/**' | ||
- 'shared/ts/**' | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 21 | ||
- name: Install PNPM | ||
uses: pnpm/[email protected] | ||
id: pnpm-install | ||
with: | ||
version: 8 | ||
run_install: false | ||
- name: Setup PNPM Cache | ||
id: pnpm-cache | ||
shell: bash | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | ||
- name: Load Cached Dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ env.STORE_PATH }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: Install Node dependencies | ||
run: pnpm install -r | ||
- name: build | ||
run: pnpm run build | ||
- uses: FirebaseExtended/action-hosting-deploy@v0 | ||
if: github.event_name != 'pull_request' | ||
with: | ||
repoToken: '${{ secrets.GITHUB_TOKEN }}' | ||
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_BASEMIND_AI_DEVELOPMENT }}' | ||
channelId: live | ||
projectId: basemind-ai-development | ||
- uses: FirebaseExtended/action-hosting-deploy@v0 | ||
if: github.event_name == 'pull_request' | ||
with: | ||
repoToken: '${{ secrets.GITHUB_TOKEN }}' | ||
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_BASEMIND_AI_DEVELOPMENT }}' | ||
projectId: basemind-ai-development |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,17 @@ on: | |
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'frontend/**' | ||
- 'gen/ts/**' | ||
- 'package.json' | ||
- 'pnpm-lock.yaml' | ||
- 'pnpm-workspace.yaml' | ||
- 'services/openai-connector/**' | ||
- 'services/cohere-connector/**' | ||
- 'shared/ts/**' | ||
- 'tsconfig.json' | ||
- 'vitest.*' | ||
pull_request: | ||
branches: | ||
- main | ||
|
@@ -29,30 +40,32 @@ jobs: | |
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 21 | ||
- name: Download the DeepSource CLI | ||
run: curl https://deepsource.io/cli | sh | ||
- name: Install pnpm | ||
- name: Install PNPM | ||
uses: pnpm/[email protected] | ||
id: pnpm-install | ||
with: | ||
version: 8 | ||
- name: Setup pnpm cache | ||
run_install: false | ||
- name: Setup PNPM Cache | ||
id: pnpm-cache | ||
run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | ||
- uses: actions/cache@v3 | ||
name: Load cached Node dependencies | ||
shell: bash | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | ||
- name: Load Cached Dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | ||
path: ${{ env.STORE_PATH }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: ${{ runner.os }}-pnpm-store- | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: Install Node dependencies | ||
run: pnpm install -r | ||
- name: Download the DeepSource CLI | ||
run: curl https://deepsource.io/cli | sh | ||
- name: Test | ||
run: pnpm run test:coverage | ||
- name: Upload Coverage Report | ||
|
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 |
---|---|---|
|
@@ -10,12 +10,37 @@ jobs: | |
validate: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 21 | ||
- name: Install PNPM | ||
uses: pnpm/[email protected] | ||
id: pnpm-install | ||
with: | ||
version: 8 | ||
run_install: false | ||
- name: Setup PNPM Cache | ||
id: pnpm-cache | ||
shell: bash | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | ||
- name: Load Cached Node Dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ env.STORE_PATH }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: Install Node dependencies | ||
run: pnpm install -r | ||
- name: Setup Golang | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.21' | ||
- name: Load cached Golang dependencies | ||
- name: Load Cached Golang Dependencies | ||
id: cached-go-dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
|
@@ -24,36 +49,15 @@ jobs: | |
~/go/pkg/mod | ||
key: go-${{ inputs.go_version }}-v1.0-${{ hashFiles('**/go.sum') }} | ||
- name: Install Golang dependencies | ||
if: steps.cached-go-dependencies.outputs.cache-hit != 'true' | ||
shell: bash | ||
run: go get -v -t ./... | ||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 21 | ||
- name: Install pnpm | ||
uses: pnpm/[email protected] | ||
id: pnpm-install | ||
with: | ||
version: 8 | ||
- name: Setup pnpm cache | ||
id: pnpm-cache | ||
run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | ||
- uses: actions/cache@v3 | ||
name: Load cached Node dependencies | ||
with: | ||
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: ${{ runner.os }}-pnpm-store- | ||
- name: Install Node dependencies | ||
run: pnpm install -r | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' | ||
- name: Install Pre-Commit | ||
run: python -m pip install pre-commit && pre-commit install | ||
- name: Load cached Pre-Commit Dependencies | ||
- name: Load Cached Pre-Commit Dependencies | ||
id: cached-pre-commit-dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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