Skip to content

Commit

Permalink
Dev (#26)
Browse files Browse the repository at this point in the history
* Update and rename master_splaceclassroom.yml to educlass.yml

* chore: Remove commented out code and unused Azure-related fields

* Dev (#14)

* delete workflow

* add: component user card

* add: component label

* add: moleculs discussItem

* add: page discuss and update userCard

* add: filter discuss

* add: component add discuss

* refactor: integrate to backend add discuss

* refactor: integrate to backend discussItem

* refactor: add mutate add discuss

* refactor: integrate discuss item to backend and fix vote

* ref: filter discuss

* Feature/discustions (#4)

* feature:create discustions :sprakles:

* feature: vote and update status discustion :sprakles:

* feature: comments ✨

* feature: bookmark :sprakles:

* feat:filter and sort discustion ✨

* bug:fix bug filter use 🐛

* fix: file change upi

* fix: useSWR

* feat: add comment

* feat: Reply Comments

* fix: discuss item & add discuss

* feat: bookmark discussion

* refactor : change filterby

* fix: fix bookmark & ux in interact discuss

* feat: share discussion

* feat: create mutateSWRPartialKey

* feat: add duration and deadline of quiz :sprakles:

* feat: filter discussion & fix useSWR

* feat: add photo in comments

* add seeder

* feat: quiz duration, quiz deadline, quiz navigation, quiz per page

* feat: landing page welcome

* feat: Login Page

* feat: re-design header & sidebar

* feature:setting project ✨

* feat:add contact ✨

* Feat/review quiz user (#7)

* feat:review quiz ✨

* feat: add start at on quiz created ✨

* feat: change color by settings

* feat: header footer for settings

* feat: uploud drag & drop

* feat: page settings

* feat: Add Zustand dependency for state management

* feat: Update all components to set by settings

* fix: update settings

* fix: default components

* Ref/quiz schema (#8)

* ref:Quiz Schema ♻️

* remove console.log

* feat: Update site name to "EduClass.AI"

* bugfix:question format update 🐛 (#10)

* ref:remove class and add import for datamaster

* feat: add import with excel

* feat: Add file upload component for importing data

* chore: Refactor create course page

* fix: button NextLink

* fix: create quest performance

* fix: choice input form

* fix: fix input lag choice input

* fix: multiple and choice answer

* fix: bug discussion

* bugfix import data master

* cleanup

* feat: create quiz

* ref: add questions on quiz detail

* fix: remove quiz type on create

* handle error

* post data

* feat: slicing quiz review

* feat: setup user quiz fetcher

* refactor: Update course and user routes to handle new data structure

* fix: create quiz choice and type not expected

* feat: do a quiz

* fix: link

* feat: Calculate total points for quiz submission

* fix: uploud document import

* refactor: Add file upload functionality to route.ts

* fix: fix object title for quiz item essay

* setup quiz generator

* feat: setup generate quiz fetch

* feat: generate quiz

* chore: Remove commented out code and unused Azure-related fields

---------

Co-authored-by: FajarWG <[email protected]>
Co-authored-by: FajarWG <[email protected]>
Co-authored-by: ichsnn <[email protected]>
Co-authored-by: “FajarWG” <“[email protected]“>
Co-authored-by: “Reymunda” <“[email protected]“>
Co-authored-by: Ichsan Nulmuhlis <[email protected]>

* chore: Remove unused Azure-related fields and code

* Dev (#17)

* delete workflow

* add: component user card

* add: component label

* add: moleculs discussItem

* add: page discuss and update userCard

* add: filter discuss

* add: component add discuss

* refactor: integrate to backend add discuss

* refactor: integrate to backend discussItem

* refactor: add mutate add discuss

* refactor: integrate discuss item to backend and fix vote

* ref: filter discuss

* Feature/discustions (#4)

* feature:create discustions :sprakles:

* feature: vote and update status discustion :sprakles:

* feature: comments ✨

* feature: bookmark :sprakles:

* feat:filter and sort discustion ✨

* bug:fix bug filter use 🐛

* fix: file change upi

* fix: useSWR

* feat: add comment

* feat: Reply Comments

* fix: discuss item & add discuss

* feat: bookmark discussion

* refactor : change filterby

* fix: fix bookmark & ux in interact discuss

* feat: share discussion

* feat: create mutateSWRPartialKey

* feat: add duration and deadline of quiz :sprakles:

* feat: filter discussion & fix useSWR

* feat: add photo in comments

* add seeder

* feat: quiz duration, quiz deadline, quiz navigation, quiz per page

* feat: landing page welcome

* feat: Login Page

* feat: re-design header & sidebar

* feature:setting project ✨

* feat:add contact ✨

* Feat/review quiz user (#7)

* feat:review quiz ✨

* feat: add start at on quiz created ✨

* feat: change color by settings

* feat: header footer for settings

* feat: uploud drag & drop

* feat: page settings

* feat: Add Zustand dependency for state management

* feat: Update all components to set by settings

* fix: update settings

* fix: default components

* Ref/quiz schema (#8)

* ref:Quiz Schema ♻️

* remove console.log

* feat: Update site name to "EduClass.AI"

* bugfix:question format update 🐛 (#10)

* ref:remove class and add import for datamaster

* feat: add import with excel

* feat: Add file upload component for importing data

* chore: Refactor create course page

* fix: button NextLink

* fix: create quest performance

* fix: choice input form

* fix: fix input lag choice input

* fix: multiple and choice answer

* fix: bug discussion

* bugfix import data master

* cleanup

* feat: create quiz

* ref: add questions on quiz detail

* fix: remove quiz type on create

* handle error

* post data

* feat: slicing quiz review

* feat: setup user quiz fetcher

* refactor: Update course and user routes to handle new data structure

* fix: create quiz choice and type not expected

* feat: do a quiz

* fix: link

* feat: Calculate total points for quiz submission

* fix: uploud document import

* refactor: Add file upload functionality to route.ts

* fix: fix object title for quiz item essay

* setup quiz generator

* feat: setup generate quiz fetch

* feat: generate quiz

* chore: Remove commented out code and unused Azure-related fields

* chore: Remove unused Azure-related fields and code

---------

Co-authored-by: FajarWG <[email protected]>
Co-authored-by: FajarWG <[email protected]>
Co-authored-by: ichsnn <[email protected]>
Co-authored-by: “FajarWG” <“[email protected]“>
Co-authored-by: “Reymunda” <“[email protected]“>
Co-authored-by: Ichsan Nulmuhlis <[email protected]>

* Update educlass.yml

* fix: chatbot features

* chore: dynamic course class

* feat: Update resource upload process

The resource upload process has been updated to use the file URL instead of the file itself. This change improves the efficiency of the upload process and reduces unnecessary file handling.

* chore: Update resource upload process to include callback URL

* fix: disable button non used

* Dev (#18)

* delete workflow

* add: component user card

* add: component label

* add: moleculs discussItem

* add: page discuss and update userCard

* add: filter discuss

* add: component add discuss

* refactor: integrate to backend add discuss

* refactor: integrate to backend discussItem

* refactor: add mutate add discuss

* refactor: integrate discuss item to backend and fix vote

* ref: filter discuss

* Feature/discustions (#4)

* feature:create discustions :sprakles:

* feature: vote and update status discustion :sprakles:

* feature: comments ✨

* feature: bookmark :sprakles:

* feat:filter and sort discustion ✨

* bug:fix bug filter use 🐛

* fix: file change upi

* fix: useSWR

* feat: add comment

* feat: Reply Comments

* fix: discuss item & add discuss

* feat: bookmark discussion

* refactor : change filterby

* fix: fix bookmark & ux in interact discuss

* feat: share discussion

* feat: create mutateSWRPartialKey

* feat: add duration and deadline of quiz :sprakles:

* feat: filter discussion & fix useSWR

* feat: add photo in comments

* add seeder

* feat: quiz duration, quiz deadline, quiz navigation, quiz per page

* feat: landing page welcome

* feat: Login Page

* feat: re-design header & sidebar

* feature:setting project ✨

* feat:add contact ✨

* Feat/review quiz user (#7)

* feat:review quiz ✨

* feat: add start at on quiz created ✨

* feat: change color by settings

* feat: header footer for settings

* feat: uploud drag & drop

* feat: page settings

* feat: Add Zustand dependency for state management

* feat: Update all components to set by settings

* fix: update settings

* fix: default components

* Ref/quiz schema (#8)

* ref:Quiz Schema ♻️

* remove console.log

* feat: Update site name to "EduClass.AI"

* bugfix:question format update 🐛 (#10)

* ref:remove class and add import for datamaster

* feat: add import with excel

* feat: Add file upload component for importing data

* chore: Refactor create course page

* fix: button NextLink

* fix: create quest performance

* fix: choice input form

* fix: fix input lag choice input

* fix: multiple and choice answer

* fix: bug discussion

* bugfix import data master

* cleanup

* feat: create quiz

* ref: add questions on quiz detail

* fix: remove quiz type on create

* handle error

* post data

* feat: slicing quiz review

* feat: setup user quiz fetcher

* refactor: Update course and user routes to handle new data structure

* fix: create quiz choice and type not expected

* feat: do a quiz

* fix: link

* feat: Calculate total points for quiz submission

* fix: uploud document import

* refactor: Add file upload functionality to route.ts

* fix: fix object title for quiz item essay

* setup quiz generator

* feat: setup generate quiz fetch

* feat: generate quiz

* chore: Remove commented out code and unused Azure-related fields

* chore: Remove unused Azure-related fields and code

* fix: chatbot features

* chore: dynamic course class

* feat: Update resource upload process

The resource upload process has been updated to use the file URL instead of the file itself. This change improves the efficiency of the upload process and reduces unnecessary file handling.

* chore: Update resource upload process to include callback URL

* fix: disable button non used

---------

Co-authored-by: FajarWG <[email protected]>
Co-authored-by: FajarWG <[email protected]>
Co-authored-by: ichsnn <[email protected]>
Co-authored-by: “FajarWG” <“[email protected]“>
Co-authored-by: “Reymunda” <“[email protected]“>
Co-authored-by: Ichsan Nulmuhlis <[email protected]>

* chore: Update @azure/storage-blob dependency to version 12.17.0

* fix: fetch api with env

* Dev (#20)

* delete workflow

* add: component user card

* add: component label

* add: moleculs discussItem

* add: page discuss and update userCard

* add: filter discuss

* add: component add discuss

* refactor: integrate to backend add discuss

* refactor: integrate to backend discussItem

* refactor: add mutate add discuss

* refactor: integrate discuss item to backend and fix vote

* ref: filter discuss

* Feature/discustions (#4)

* feature:create discustions :sprakles:

* feature: vote and update status discustion :sprakles:

* feature: comments ✨

* feature: bookmark :sprakles:

* feat:filter and sort discustion ✨

* bug:fix bug filter use 🐛

* fix: file change upi

* fix: useSWR

* feat: add comment

* feat: Reply Comments

* fix: discuss item & add discuss

* feat: bookmark discussion

* refactor : change filterby

* fix: fix bookmark & ux in interact discuss

* feat: share discussion

* feat: create mutateSWRPartialKey

* feat: add duration and deadline of quiz :sprakles:

* feat: filter discussion & fix useSWR

* feat: add photo in comments

* add seeder

* feat: quiz duration, quiz deadline, quiz navigation, quiz per page

* feat: landing page welcome

* feat: Login Page

* feat: re-design header & sidebar

* feature:setting project ✨

* feat:add contact ✨

* Feat/review quiz user (#7)

* feat:review quiz ✨

* feat: add start at on quiz created ✨

* feat: change color by settings

* feat: header footer for settings

* feat: uploud drag & drop

* feat: page settings

* feat: Add Zustand dependency for state management

* feat: Update all components to set by settings

* fix: update settings

* fix: default components

* Ref/quiz schema (#8)

* ref:Quiz Schema ♻️

* remove console.log

* feat: Update site name to "EduClass.AI"

* bugfix:question format update 🐛 (#10)

* ref:remove class and add import for datamaster

* feat: add import with excel

* feat: Add file upload component for importing data

* chore: Refactor create course page

* fix: button NextLink

* fix: create quest performance

* fix: choice input form

* fix: fix input lag choice input

* fix: multiple and choice answer

* fix: bug discussion

* bugfix import data master

* cleanup

* feat: create quiz

* ref: add questions on quiz detail

* fix: remove quiz type on create

* handle error

* post data

* feat: slicing quiz review

* feat: setup user quiz fetcher

* refactor: Update course and user routes to handle new data structure

* fix: create quiz choice and type not expected

* feat: do a quiz

* fix: link

* feat: Calculate total points for quiz submission

* fix: uploud document import

* refactor: Add file upload functionality to route.ts

* fix: fix object title for quiz item essay

* setup quiz generator

* feat: setup generate quiz fetch

* feat: generate quiz

* chore: Remove commented out code and unused Azure-related fields

* chore: Remove commented out code and unused Azure-related fields (#15)

* chore: Remove unused Azure-related fields and code

* Dev (#16)

* chore: Remove commented out code and unused Azure-related fields

* chore: Remove unused Azure-related fields and code

* fix: chatbot features

* chore: dynamic course class

* feat: Update resource upload process

The resource upload process has been updated to use the file URL instead of the file itself. This change improves the efficiency of the upload process and reduces unnecessary file handling.

* chore: Update resource upload process to include callback URL

* fix: disable button non used

* chore: Update @azure/storage-blob dependency to version 12.17.0

* fix: fetch api with env

---------

Co-authored-by: FajarWG <[email protected]>
Co-authored-by: FajarWG <[email protected]>
Co-authored-by: ichsnn <[email protected]>
Co-authored-by: “FajarWG” <“[email protected]“>
Co-authored-by: “Reymunda” <“[email protected]“>
Co-authored-by: Ichsan Nulmuhlis <[email protected]>

* Dev (#22)

* delete workflow

* add: component user card

* add: component label

* add: moleculs discussItem

* add: page discuss and update userCard

* add: filter discuss

* add: component add discuss

* refactor: integrate to backend add discuss

* refactor: integrate to backend discussItem

* refactor: add mutate add discuss

* refactor: integrate discuss item to backend and fix vote

* ref: filter discuss

* Feature/discustions (#4)

* feature:create discustions :sprakles:

* feature: vote and update status discustion :sprakles:

* feature: comments ✨

* feature: bookmark :sprakles:

* feat:filter and sort discustion ✨

* bug:fix bug filter use 🐛

* fix: file change upi

* fix: useSWR

* feat: add comment

* feat: Reply Comments

* fix: discuss item & add discuss

* feat: bookmark discussion

* refactor : change filterby

* fix: fix bookmark & ux in interact discuss

* feat: share discussion

* feat: create mutateSWRPartialKey

* feat: add duration and deadline of quiz :sprakles:

* feat: filter discussion & fix useSWR

* feat: add photo in comments

* add seeder

* feat: quiz duration, quiz deadline, quiz navigation, quiz per page

* feat: landing page welcome

* feat: Login Page

* feat: re-design header & sidebar

* feature:setting project ✨

* feat:add contact ✨

* Feat/review quiz user (#7)

* feat:review quiz ✨

* feat: add start at on quiz created ✨

* feat: change color by settings

* feat: header footer for settings

* feat: uploud drag & drop

* feat: page settings

* feat: Add Zustand dependency for state management

* feat: Update all components to set by settings

* fix: update settings

* fix: default components

* Ref/quiz schema (#8)

* ref:Quiz Schema ♻️

* remove console.log

* feat: Update site name to "EduClass.AI"

* bugfix:question format update 🐛 (#10)

* ref:remove class and add import for datamaster

* feat: add import with excel

* feat: Add file upload component for importing data

* chore: Refactor create course page

* fix: button NextLink

* fix: create quest performance

* fix: choice input form

* fix: fix input lag choice input

* fix: multiple and choice answer

* fix: bug discussion

* bugfix import data master

* cleanup

* feat: create quiz

* ref: add questions on quiz detail

* fix: remove quiz type on create

* handle error

* post data

* feat: slicing quiz review

* feat: setup user quiz fetcher

* refactor: Update course and user routes to handle new data structure

* fix: create quiz choice and type not expected

* feat: do a quiz

* fix: link

* feat: Calculate total points for quiz submission

* fix: uploud document import

* refactor: Add file upload functionality to route.ts

* fix: fix object title for quiz item essay

* setup quiz generator

* feat: setup generate quiz fetch

* feat: generate quiz

* chore: Remove commented out code and unused Azure-related fields

* chore: Remove commented out code and unused Azure-related fields (#15)

* chore: Remove unused Azure-related fields and code

* Dev (#16)

* chore: Remove commented out code and unused Azure-related fields

* chore: Remove unused Azure-related fields and code

* fix: chatbot features

* chore: dynamic course class

* feat: Update resource upload process

The resource upload process has been updated to use the file URL instead of the file itself. This change improves the efficiency of the upload process and reduces unnecessary file handling.

* chore: Update resource upload process to include callback URL

* fix: disable button non used

* chore: Update @azure/storage-blob dependency to version 12.17.0

* fix: fetch api with env

---------

Co-authored-by: FajarWG <[email protected]>
Co-authored-by: FajarWG <[email protected]>
Co-authored-by: ichsnn <[email protected]>
Co-authored-by: “FajarWG” <“[email protected]“>
Co-authored-by: “Reymunda” <“[email protected]“>
Co-authored-by: Ichsan Nulmuhlis <[email protected]>

* fix: reply comments

* add: loading skeleton discuss

* feat: Add status and error message to course API response

This commit adds the `status` and `error_message` fields to the course API response. This will provide additional information about the status and any error messages associated with the course.

* chore: Update deployment directory to educlass_v2

* Dev (#23)

* delete workflow

* add: component user card

* add: component label

* add: moleculs discussItem

* add: page discuss and update userCard

* add: filter discuss

* add: component add discuss

* refactor: integrate to backend add discuss

* refactor: integrate to backend discussItem

* refactor: add mutate add discuss

* refactor: integrate discuss item to backend and fix vote

* ref: filter discuss

* Feature/discustions (#4)

* feature:create discustions :sprakles:

* feature: vote and update status discustion :sprakles:

* feature: comments ✨

* feature: bookmark :sprakles:

* feat:filter and sort discustion ✨

* bug:fix bug filter use 🐛

* fix: file change upi

* fix: useSWR

* feat: add comment

* feat: Reply Comments

* fix: discuss item & add discuss

* feat: bookmark discussion

* refactor : change filterby

* fix: fix bookmark & ux in interact discuss

* feat: share discussion

* feat: create mutateSWRPartialKey

* feat: add duration and deadline of quiz :sprakles:

* feat: filter discussion & fix useSWR

* feat: add photo in comments

* add seeder

* feat: quiz duration, quiz deadline, quiz navigation, quiz per page

* feat: landing page welcome

* feat: Login Page

* feat: re-design header & sidebar

* feature:setting project ✨

* feat:add contact ✨

* Feat/review quiz user (#7)

* feat:review quiz ✨

* feat: add start at on quiz created ✨

* feat: change color by settings

* feat: header footer for settings

* feat: uploud drag & drop

* feat: page settings

* feat: Add Zustand dependency for state management

* feat: Update all components to set by settings

* fix: update settings

* fix: default components

* Ref/quiz schema (#8)

* ref:Quiz Schema ♻️

* remove console.log

* feat: Update site name to "EduClass.AI"

* bugfix:question format update 🐛 (#10)

* ref:remove class and add import for datamaster

* feat: add import with excel

* feat: Add file upload component for importing data

* chore: Refactor create course page

* fix: button NextLink

* fix: create quest performance

* fix: choice input form

* fix: fix input lag choice input

* fix: multiple and choice answer

* fix: bug discussion

* bugfix import data master

* cleanup

* feat: create quiz

* ref: add questions on quiz detail

* fix: remove quiz type on create

* handle error

* post data

* feat: slicing quiz review

* feat: setup user quiz fetcher

* refactor: Update course and user routes to handle new data structure

* fix: create quiz choice and type not expected

* feat: do a quiz

* fix: link

* feat: Calculate total points for quiz submission

* fix: uploud document import

* refactor: Add file upload functionality to route.ts

* fix: fix object title for quiz item essay

* setup quiz generator

* feat: setup generate quiz fetch

* feat: generate quiz

* chore: Remove commented out code and unused Azure-related fields

* chore: Remove commented out code and unused Azure-related fields (#15)

* chore: Remove unused Azure-related fields and code

* Dev (#16)

* chore: Remove commented out code and unused Azure-related fields

* chore: Remove unused Azure-related fields and code

* fix: chatbot features

* chore: dynamic course class

* feat: Update resource upload process

The resource upload process has been updated to use the file URL instead of the file itself. This change improves the efficiency of the upload process and reduces unnecessary file handling.

* chore: Update resource upload process to include callback URL

* fix: disable button non used

* chore: Update @azure/storage-blob dependency to version 12.17.0

* fix: fetch api with env

* fix: reply comments

* feat: Add status and error message to course API response

This commit adds the `status` and `error_message` fields to the course API response. This will provide additional information about the status and any error messages associated with the course.

* chore: Update deployment directory to educlass_v2

---------

Co-authored-by: FajarWG <[email protected]>
Co-authored-by: FajarWG <[email protected]>
Co-authored-by: ichsnn <[email protected]>
Co-authored-by: “FajarWG” <“[email protected]“>
Co-authored-by: “Reymunda” <“[email protected]“>
Co-authored-by: Ichsan Nulmuhlis <[email protected]>

* fix: logo-brand and try catch discuss

* refactor: Update resource upload process to improve efficiency and reduce file handling

* change callbackurl

* chore: update tailwindcss version

* chore: update postcss version

* feat: add status uploud rag & alert start quiz

* chore: change header to general app

* Update educlass.yml

* fix: header and color

* fix: no modules in courses

* refactor: Improve user quiz retrieval and scoring logic

* fix: first modules status

* chore: Update Azure Web App deployment workflow

---------

Co-authored-by: FajarWG <[email protected]>
Co-authored-by: FajarWG <[email protected]>
Co-authored-by: ichsnn <[email protected]>
Co-authored-by: “FajarWG” <“[email protected]“>
Co-authored-by: “Reymunda” <“[email protected]“>
Co-authored-by: Ichsan Nulmuhlis <[email protected]>
  • Loading branch information
7 people authored Jul 26, 2024
1 parent e7e34d2 commit 045487e
Showing 1 changed file with 101 additions and 0 deletions.
101 changes: 101 additions & 0 deletions .github/workflows/master_splace.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions

name: Build and deploy NextJs app to Azure Web App - splaceclassroom

on:
push:
branches:
- master
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
environment:
name: 'Production'
env:
NEXT_PUBLIC_BASE_URL: ${{ secrets.NEXT_PUBLIC_BASE_URL }}
NEXT_PUBLIC_API_URL: ${{ secrets.NEXT_PUBLIC_API_URL }}
NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }}
NEXTAUTH_URL: ${{ secrets.NEXTAUTH_URL }}
DATABASE_URL: ${{ secrets.DATABASE_URL }}
AZURE_OPENAI_KEY: ${{ secrets.AZURE_OPENAI_KEY }}
AZURE_OPENAI_ENDPOINT: ${{ secrets.AZURE_OPENAI_ENDPOINT }}
AZURE_OPENAI_MODEL_NAME: ${{ secrets.AZURE_OPENAI_MODEL_NAME }}
AZURE_SEARCH_ENDPOINT: ${{ secrets.AZURE_SEARCH_ENDPOINT }}
AZURE_SEARCH_KEY: ${{ secrets.AZURE_SEARCH_KEY }}
AZURE_STORAGE_KEY: ${{ secrets.AZURE_STORAGE_KEY }}
AZURE_STORAGE_ACCOUNT: ${{ secrets.AZURE_STORAGE_ACCOUNT }}
AZURE_STORAGE_CONNECTION_STRING: ${{ secrets.AZURE_STORAGE_CONNECTION_STRING }}
AZURE_STORAGE_URL: ${{ secrets.AZURE_STORAGE_URL }}
steps:
- uses: actions/checkout@v4

- name: Set up Node.js version
uses: actions/setup-node@v3
with:
node-version: '21.x'
- name: Set environment variables

run: |
echo "NEXT_PUBLIC_BASE_URL=${{ secrets.NEXT_PUBLIC_BASE_URL }}" >> $GITHUB_ENV
echo "NEXT_PUBLIC_API_URL=${{ secrets.NEXT_PUBLIC_API_URL }}" >> $GITHUB_ENV
echo "NEXTAUTH_SECRET=${{ secrets.NEXTAUTH_SECRET }}" >> $GITHUB_ENV
echo "NEXTAUTH_URL=${{ secrets.NEXTAUTH_URL }}" >> $GITHUB_ENV
echo "DATABASE_URL=${{ secrets.DATABASE_URL }}" >> $GITHUB_ENV
echo "AZURE_OPENAI_KEY=${{ secrets.AZURE_OPENAI_KEY }}" >> $GITHUB_ENV
echo "AZURE_OPENAI_ENDPOINT=${{ secrets.AZURE_OPENAI_ENDPOINT }}" >> $GITHUB_ENV
echo "AZURE_OPENAI_MODEL_NAME=${{ secrets.AZURE_OPENAI_MODEL_NAME }}" >> $GITHUB_ENV
echo "AZURE_SEARCH_ENDPOINT=${{ secrets.AZURE_SEARCH_ENDPOINT }}" >> $GITHUB_ENV
echo "AZURE_SEARCH_KEY=${{ secrets.AZURE_SEARCH_KEY }}" >> $GITHUB_ENV
echo "AZURE_STORAGE_KEY=${{ secrets.AZURE_STORAGE_KEY }}" >> $GITHUB_ENV
echo "AZURE_STORAGE_ACCOUNT=${{ secrets.AZURE_STORAGE_ACCOUNT }}" >> $GITHUB_ENV
echo "AZURE_STORAGE_CONNECTION_STRING=${{ secrets.AZURE_STORAGE_CONNECTION_STRING }}" >> $GITHUB_ENV
echo "AZURE_STORAGE_URL=${{ secrets.AZURE_STORAGE_URL }}" >> $GITHUB_ENV
- name: Install Yarn
run: npm install -g yarn
- name: Cache Node.js modules
uses: actions/cache@v3
with:
path: ~/.yarn
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-
- name: npm install, build,
run: |
yarn cache clean
yarn install
npx prisma generate
npx prisma migrate deploy
yarn build
#npm run build
deploy:
needs: build

# Running on latest version of Ubuntu
runs-on: ubuntu-latest
environment:
name: 'Production'
steps:
- name: Install SSH
run: sudo apt-get install openssh-client

- name: Deploy with SSH
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USERNAME }}
password: ${{ secrets.SERVER_PASSWORD }}
script: |
echo "Starting deployment..."
cd splace-classroom/
echo "Current directory: $(pwd)"
git pull origin master
yarn install
yarn prisma:migrate
yarn build
npx pm2 restart splaceclassroom

0 comments on commit 045487e

Please sign in to comment.