Modified actions
This commit is contained in:
50
.github/workflows/gh-pages.yml
vendored
50
.github/workflows/gh-pages.yml
vendored
@@ -29,23 +29,23 @@ jobs:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3.6.0
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v4.7.0
|
||||
with:
|
||||
python-version: "3.11"
|
||||
# - name: Setup Python
|
||||
# uses: actions/setup-python@v4.7.0
|
||||
# with:
|
||||
# python-version: "3.11"
|
||||
|
||||
- name: Install Packages
|
||||
working-directory: ./scripts
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
# - name: Install Packages
|
||||
# working-directory: ./scripts
|
||||
# run: |
|
||||
# python -m pip install --upgrade pip
|
||||
# pip install -r requirements.txt
|
||||
|
||||
- name: Compile Menu
|
||||
working-directory: ./scripts
|
||||
run: python scrapeToJson.py
|
||||
# - name: Compile Menu
|
||||
# working-directory: ./scripts
|
||||
# run: python scrapeToJson.py
|
||||
|
||||
- name: Copy Data File
|
||||
run: cp ./scripts/data.dart ./lib/data.dart
|
||||
# - name: Copy Data File
|
||||
# run: cp ./scripts/data.dart ./lib/data.dart
|
||||
# - name: Cache Flutter dependencies
|
||||
# uses: actions/cache@v1
|
||||
# with:
|
||||
@@ -68,17 +68,17 @@ jobs:
|
||||
- name: Build release project
|
||||
run: flutter build web --base-href "/IIITB_Menu/" --web-renderer canvaskit
|
||||
|
||||
- name: Create Release
|
||||
uses: marvinpinto/action-automatic-releases@v1.2.1
|
||||
with:
|
||||
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
automatic_release_tag: "latest"
|
||||
prerelease: false
|
||||
draft: false
|
||||
title: "Bi-Weekly Release"
|
||||
files: |
|
||||
./scripts/out.txt
|
||||
./scripts/out.json
|
||||
# - name: Create Release
|
||||
# uses: marvinpinto/action-automatic-releases@v1.2.1
|
||||
# with:
|
||||
# repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
# automatic_release_tag: "latest"
|
||||
# prerelease: false
|
||||
# draft: false
|
||||
# title: "Bi-Weekly Release"
|
||||
# files: |
|
||||
# ./scripts/out.txt
|
||||
# ./scripts/out.json
|
||||
|
||||
- name: Upload production-ready build files
|
||||
uses: actions/upload-artifact@v3.1.2
|
||||
|
||||
46
.github/workflows/menu-file.yml
vendored
46
.github/workflows/menu-file.yml
vendored
@@ -1,46 +0,0 @@
|
||||
name: Update Menu JSON Database File.
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- menu_scraper
|
||||
pull_request:
|
||||
branches:
|
||||
- menu_scraper
|
||||
|
||||
jobs:
|
||||
compile:
|
||||
name: Compile
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v3.6.0
|
||||
with:
|
||||
ref: "menu_scraper"
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v4.7.0
|
||||
with:
|
||||
python-version: "3.11"
|
||||
|
||||
- name: Install Packages
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
|
||||
- name: Compile Menu
|
||||
run: python scrapeToJson.py
|
||||
|
||||
- name: Create Release
|
||||
uses: marvinpinto/action-automatic-releases@v1.2.1
|
||||
with:
|
||||
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
automatic_release_tag: "latest"
|
||||
prerelease: false
|
||||
draft: false
|
||||
title: "Bi-Weekly Release"
|
||||
files: |
|
||||
out.txt
|
||||
out.json
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -10,7 +10,7 @@ import "package:http/http.dart";
|
||||
import "package:intl/intl.dart";
|
||||
import "package:shared_preferences/shared_preferences.dart";
|
||||
// import "package:dio/dio.dart";
|
||||
import "package:iiitb_menu/data.dart" as menuData;
|
||||
// import "package:iiitb_menu/data.dart" as menuData;
|
||||
|
||||
class GlobalModel extends ChangeNotifier {
|
||||
late Map<dynamic, dynamic> mainData;
|
||||
@@ -113,7 +113,7 @@ class GlobalModel extends ChangeNotifier {
|
||||
// fileLink.writeAsStringSync(rawData, mode: FileMode.write);
|
||||
prefs.setString(storageKey, rawData);
|
||||
}
|
||||
returnData = jsonDecode(menuData.data);
|
||||
// returnData = jsonDecode(menuData.data);
|
||||
return returnData;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user