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

New day #353

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
76 changes: 76 additions & 0 deletions .github/workflows/main_ellia.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions
# More info on Python, GitHub Actions, and Azure App Service: https://aka.ms/python-webapps-actions

name: Build and deploy Python app to Azure Web App - ellia

on:
push:
branches:
- main
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Python version
uses: actions/setup-python@v1
with:
python-version: '3.12'

- name: Create and start virtual environment
run: |
python -m venv venv
source venv/bin/activate

- name: Install dependencies
run: pip install -r requirements.txt

# Optional: Add step to run tests here (PyTest, Django test suites, etc.)

- name: Zip artifact for deployment
run: zip release.zip ./* -r

- name: Upload artifact for deployment jobs
uses: actions/upload-artifact@v3
with:
name: python-app
path: |
release.zip
!venv/

deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: 'Production'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}

steps:
- name: Download artifact from build job
uses: actions/download-artifact@v3
with:
name: python-app

- name: Unzip artifact for deployment
run: unzip release.zip


- name: 'Deploy to Azure Web App'
uses: azure/webapps-deploy@v2
id: deploy-to-webapp
with:
app-name: 'ellia'
slot-name: 'Production'
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_9D602BC366554F338F7AE84B04484DD9 }}
- name: 'deploy chatbox'
uses: azure/appservice-settings@v1
with:
app-name: 'milligram'
slot-name: 'Production' # Optional and needed only if the settings have to be configured on the specific deployment slot
app-settings-json: '[{ "name": "CHAT_API_KEY", "value": "${{ secrets.CHAT_API_KEY }}", "slotSetting": false }, { "name": "CHAT_API_ENDPOINT", "value": "${{ secrets.CHAT_API_ENDPOINT }}", "slotSetting": false }, { "name": "AZURE_OPENAI_MODEL_NAME", "value": "${{ secrets.AZURE_OPENAI_MODEL_NAME }}", "slotSetting": false }]'
id: settings
7 changes: 5 additions & 2 deletions frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
<vue-page-stack>
<router-view :key="screen" class="router-view-c"></router-view>
</vue-page-stack>
</transition>
</transition>
<footer class="footer">
Made with love ❤️
</footer>
</div>
</template>

Expand Down Expand Up @@ -135,4 +138,4 @@ export default class App extends Vue {
#bottom {
bottom: 0;
}
</style>
</style>
4 changes: 2 additions & 2 deletions frontend/src/views/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<div id="right"></div>
<div id="top"></div>
<div id="bottom"></div>
<b-navbar-item id="fontnavbar" class="title is-2">
Milligram
<b-navbar-item id="fontnavbar" class="title is-2" style="color:aquamarine">
Elleaingram
</b-navbar-item>
</template>
</b-navbar>
Expand Down