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
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3.6.0
|
uses: actions/checkout@v3.6.0
|
||||||
|
|
||||||
- name: Setup Python
|
# - name: Setup Python
|
||||||
uses: actions/setup-python@v4.7.0
|
# uses: actions/setup-python@v4.7.0
|
||||||
with:
|
# with:
|
||||||
python-version: "3.11"
|
# python-version: "3.11"
|
||||||
|
|
||||||
- name: Install Packages
|
# - name: Install Packages
|
||||||
working-directory: ./scripts
|
# working-directory: ./scripts
|
||||||
run: |
|
# run: |
|
||||||
python -m pip install --upgrade pip
|
# python -m pip install --upgrade pip
|
||||||
pip install -r requirements.txt
|
# pip install -r requirements.txt
|
||||||
|
|
||||||
- name: Compile Menu
|
# - name: Compile Menu
|
||||||
working-directory: ./scripts
|
# working-directory: ./scripts
|
||||||
run: python scrapeToJson.py
|
# run: python scrapeToJson.py
|
||||||
|
|
||||||
- name: Copy Data File
|
# - name: Copy Data File
|
||||||
run: cp ./scripts/data.dart ./lib/data.dart
|
# run: cp ./scripts/data.dart ./lib/data.dart
|
||||||
# - name: Cache Flutter dependencies
|
# - name: Cache Flutter dependencies
|
||||||
# uses: actions/cache@v1
|
# uses: actions/cache@v1
|
||||||
# with:
|
# with:
|
||||||
@@ -68,17 +68,17 @@ jobs:
|
|||||||
- name: Build release project
|
- name: Build release project
|
||||||
run: flutter build web --base-href "/IIITB_Menu/" --web-renderer canvaskit
|
run: flutter build web --base-href "/IIITB_Menu/" --web-renderer canvaskit
|
||||||
|
|
||||||
- name: Create Release
|
# - name: Create Release
|
||||||
uses: marvinpinto/action-automatic-releases@v1.2.1
|
# uses: marvinpinto/action-automatic-releases@v1.2.1
|
||||||
with:
|
# with:
|
||||||
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
# repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
automatic_release_tag: "latest"
|
# automatic_release_tag: "latest"
|
||||||
prerelease: false
|
# prerelease: false
|
||||||
draft: false
|
# draft: false
|
||||||
title: "Bi-Weekly Release"
|
# title: "Bi-Weekly Release"
|
||||||
files: |
|
# files: |
|
||||||
./scripts/out.txt
|
# ./scripts/out.txt
|
||||||
./scripts/out.json
|
# ./scripts/out.json
|
||||||
|
|
||||||
- name: Upload production-ready build files
|
- name: Upload production-ready build files
|
||||||
uses: actions/upload-artifact@v3.1.2
|
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:intl/intl.dart";
|
||||||
import "package:shared_preferences/shared_preferences.dart";
|
import "package:shared_preferences/shared_preferences.dart";
|
||||||
// import "package:dio/dio.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 {
|
class GlobalModel extends ChangeNotifier {
|
||||||
late Map<dynamic, dynamic> mainData;
|
late Map<dynamic, dynamic> mainData;
|
||||||
@@ -113,7 +113,7 @@ class GlobalModel extends ChangeNotifier {
|
|||||||
// fileLink.writeAsStringSync(rawData, mode: FileMode.write);
|
// fileLink.writeAsStringSync(rawData, mode: FileMode.write);
|
||||||
prefs.setString(storageKey, rawData);
|
prefs.setString(storageKey, rawData);
|
||||||
}
|
}
|
||||||
returnData = jsonDecode(menuData.data);
|
// returnData = jsonDecode(menuData.data);
|
||||||
return returnData;
|
return returnData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user