Skip to content
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
2 changes: 1 addition & 1 deletion .deployment
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[config]
[config]
SCM_DO_BUILD_DURING_DEPLOYMENT=true
32 changes: 16 additions & 16 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"image": "mcr.microsoft.com/devcontainers/universal:2",
"postCreateCommand": "python3 -m pip install -r Application/requirements.txt",
"customizations": {
"codespaces": {
"openFiles": ["README.md"]
},
"vscode": {
"extensions": [
"ms-toolsai.jupyter",
"ms-python.python",
"github.copilot"
]
}
}
}
{
"image": "mcr.microsoft.com/devcontainers/universal:2",
"postCreateCommand": "python3 -m pip install -r Application/requirements.txt",
"customizations": {
"codespaces": {
"openFiles": ["README.md"]
},
"vscode": {
"extensions": [
"ms-toolsai.jupyter",
"ms-python.python",
"github.copilot"
]
}
}
}
16 changes: 8 additions & 8 deletions .funcignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.venv
day1
day2
frontend
helper_scripts
infra
__pycache__
img
.venv
day1
day2
frontend
helper_scripts
infra
__pycache__
img
228 changes: 114 additions & 114 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -1,114 +1,114 @@
name: pages

on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
packages: write
contents: write

jobs:
build-app:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "16"
cache: "npm"
cache-dependency-path: frontend/package-lock.json

- name: Install dependencies
run: npm ci
working-directory: frontend

- name: Build Static Web App
run: npm run build -- --base=$BASE_URL
env:
BASE_URL: ${{ github.event.repository.name }}
VITE_FACE_API_KEY: ${{ secrets.VITE_FACE_API_KEY }}
VITE_SPEECH_API_KEY: ${{ secrets.VITE_SPEECH_API_KEY }}
VITE_IMAGE_API_URL: ${{secrets.VITE_IMAGE_API_URL}}
VITE_FACE_API_ENDPOINT: ${{secrets.VITE_FACE_API_ENDPOINT}}
VITE_VISION_API_ENDPOINT: ${{secrets.VITE_VISION_API_ENDPOINT}}
VITE_VISION_API_KEY: ${{secrets.VITE_VISION_API_KEY}}
VITE_CHAT_API_ENDPOINT: ${{secrets.VITE_CHAT_API_ENDPOINT}}
working-directory: frontend

- name: Upload result of Static Web App build
uses: actions/upload-artifact@v3
with:
name: static-webapp
path: frontend/dist

build-documentation:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
if: github.repository_owner == 'microsoft'
with:
lfs: true

- uses: actions/setup-node@v3
if: github.repository_owner == 'microsoft'
with:
node-version: "14"

- run: npm init -y
if: github.repository_owner == 'microsoft'

- run: npm install vuepress vuepress-plugin-code-copy
if: github.repository_owner == 'microsoft'

- run: node_modules/.bin/vuepress build
if: github.repository_owner == 'microsoft'

- name: Upload result of vuepress build
uses: actions/upload-artifact@v3
if: github.repository_owner == 'microsoft'
with:
name: static-website
path: .vuepress/dist
if-no-files-found: error

deploy:
runs-on: ubuntu-latest
needs:
- build-app
- build-documentation
environment:
name: pages
url: https://${{ github.repository_owner }}.github.io/everyonecancode

if: github.ref == 'refs/heads/main'

steps:
- name: Download build of static app
uses: actions/download-artifact@v3
with:
name: static-webapp
path: dist

- name: Download build of static website
uses: actions/download-artifact@v3
if: github.repository_owner == 'microsoft'
with:
name: static-website
path: dist/instructions

- name: Deploy to GitHub Pages
uses: crazy-max/ghaction-github-pages@v3
with:
build_dir: dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
name: pages
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
packages: write
contents: write
jobs:
build-app:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "16"
cache: "npm"
cache-dependency-path: frontend/package-lock.json
- name: Install dependencies
run: npm ci
working-directory: frontend
- name: Build Static Web App
run: npm run build -- --base=$BASE_URL
env:
BASE_URL: ${{ github.event.repository.name }}
VITE_FACE_API_KEY: ${{ secrets.VITE_FACE_API_KEY }}
VITE_SPEECH_API_KEY: ${{ secrets.VITE_SPEECH_API_KEY }}
VITE_IMAGE_API_URL: ${{secrets.VITE_IMAGE_API_URL}}
VITE_FACE_API_ENDPOINT: ${{secrets.VITE_FACE_API_ENDPOINT}}
VITE_VISION_API_ENDPOINT: ${{secrets.VITE_VISION_API_ENDPOINT}}
VITE_VISION_API_KEY: ${{secrets.VITE_VISION_API_KEY}}
VITE_CHAT_API_ENDPOINT: ${{secrets.VITE_CHAT_API_ENDPOINT}}
working-directory: frontend
- name: Upload result of Static Web App build
uses: actions/upload-artifact@v3
with:
name: static-webapp
path: frontend/dist
build-documentation:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
if: github.repository_owner == 'microsoft'
with:
lfs: true
- uses: actions/setup-node@v3
if: github.repository_owner == 'microsoft'
with:
node-version: "14"
- run: npm init -y
if: github.repository_owner == 'microsoft'
- run: npm install vuepress vuepress-plugin-code-copy
if: github.repository_owner == 'microsoft'
- run: node_modules/.bin/vuepress build
if: github.repository_owner == 'microsoft'
- name: Upload result of vuepress build
uses: actions/upload-artifact@v3
if: github.repository_owner == 'microsoft'
with:
name: static-website
path: .vuepress/dist
if-no-files-found: error
deploy:
runs-on: ubuntu-latest
needs:
- build-app
- build-documentation
environment:
name: pages
url: https://${{ github.repository_owner }}.github.io/everyonecancode
if: github.ref == 'refs/heads/main'
steps:
- name: Download build of static app
uses: actions/download-artifact@v3
with:
name: static-webapp
path: dist
- name: Download build of static website
uses: actions/download-artifact@v3
if: github.repository_owner == 'microsoft'
with:
name: static-website
path: dist/instructions
- name: Deploy to GitHub Pages
uses: crazy-max/ghaction-github-pages@v3
with:
build_dir: dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading