chore: github workflows setup

This commit is contained in:
2025-01-24 19:54:27 +01:00
parent e3268a689c
commit c97a525f24
5 changed files with 64 additions and 13 deletions
+5
View File
@@ -0,0 +1,5 @@
{
"projects": {
"default": "srjp-td2"
}
}
@@ -0,0 +1,20 @@
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools
name: Deploy to Firebase Hosting on merge
on:
push:
branches:
- main
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: yarn build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_SRJP_TD2 }}
channelId: live
projectId: srjp-td2
@@ -0,0 +1,21 @@
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools
name: Deploy to Firebase Hosting on PR
on: pull_request
permissions:
checks: write
contents: read
pull-requests: write
jobs:
build_and_preview:
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: yarn build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_SRJP_TD2 }}
projectId: srjp-td2
+10
View File
@@ -0,0 +1,10 @@
{
"hosting": {
"public": "dist",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
]
}
}
+8 -13
View File
@@ -209,14 +209,14 @@
import { defineComponent } from 'vue'; import { defineComponent } from 'vue';
import { useGlobalStore } from './stores/global.store'; import { useGlobalStore } from './stores/global.store';
const additionalData = { // const additionalData = {
// Mijanki // // Mijanki
passings: ['Stolnica Wielka'], // passings: ['Stolnica Wielka'],
// SHP // // SHP
shpSystems: [], // shpSystems: [],
// 4-stawne SBL // // 4-stawne SBL
sbl4: [], // sbl4: [],
}; // };
interface StopRow { interface StopRow {
pointName: string; pointName: string;
@@ -301,8 +301,6 @@ export default defineComponent({
let departureSpeed = currentPath.departureLineData?.routeSpeed ?? 0, let departureSpeed = currentPath.departureLineData?.routeSpeed ?? 0,
departureTracks = currentPath.departureLineData?.routeTracks ?? 2; departureTracks = currentPath.departureLineData?.routeTracks ?? 2;
let checkEntryAsFirst = true;
for (const stop of timetable.stopList) { for (const stop of timetable.stopList) {
if (stop.arrivalLine && stop.arrivalLine == currentPath.arrivalLine) { if (stop.arrivalLine && stop.arrivalLine == currentPath.arrivalLine) {
arrivalKm = stop.stopDistance; arrivalKm = stop.stopDistance;
@@ -339,8 +337,6 @@ export default defineComponent({
}; };
arrivalKm = stop.stopDistance; arrivalKm = stop.stopDistance;
checkEntryAsFirst = false;
if (stop.departureTimestamp) lastDepartureTimestamp = stop.departureTimestamp; if (stop.departureTimestamp) lastDepartureTimestamp = stop.departureTimestamp;
stopRows.push(rowData); stopRows.push(rowData);
@@ -361,7 +357,6 @@ export default defineComponent({
} }
currentPath = timetablePath[++currentPathIndex]; currentPath = timetablePath[++currentPathIndex];
checkEntryAsFirst = true;
} }
} }