Skip to content

Commit

Permalink
WIP deploy via CI on pages
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieuher committed Jan 17, 2024
1 parent 8374be2 commit 58a609f
Show file tree
Hide file tree
Showing 6 changed files with 153 additions and 173 deletions.
25 changes: 0 additions & 25 deletions .github/workflows/build.yml

This file was deleted.

46 changes: 46 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ master ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
with:
submodules: recursive

# Runs a single command using the runners shell
- name: Build game
run: |
npm install
npm run build -- --public-url /retroski
# Runs a set of commands using the runners shell
- name: Deploy to GitHub Pages
# You may pin to the exact commit or the version.
# uses: JamesIves/github-pages-deploy-action@164583b9e44b4fc5910e78feb607ea7c98d3c7b9
uses: [email protected]
with:
# This is the branch you wish to deploy to, for example gh-pages or docs.
branch: main
# The folder in your repository that you want to deploy. If your build script compiles into a directory named build you would put it here. Folder paths cannot have a leading / or ./. If you wish to deploy the root directory you can place a . here.
folder: dist
# If you would like to push the contents of the deployment folder into a specific directory on the deployment branch you can specify it here.
target-folder: ./retroski
# If you need to customize the commit message for an integration you can do so.
commit-message: Deploy game
43 changes: 0 additions & 43 deletions .github/workflows/static.yml

This file was deleted.

206 changes: 101 additions & 105 deletions dist/index.html
Original file line number Diff line number Diff line change
@@ -1,106 +1,102 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="./assets/favicon-DrQSsmaJ.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<title>Retro Ski</title>
<script type="module" crossorigin src="./assets/index-Uohsabmt.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-ufHf_1V0.css">
</head>

<body>
<div class="ui-container">
<div class="header">
Retro ski
</div>
<div class="hud-container">
<div id="event-setup">
<div class="dialog">
<div class="title">Event setup</div>
<div class="dialog-content">
<div class="form-line">
<div class="label">Track</div>
<div class="input">
<input type="text" id="track-input" value="davos"
placeholder="davos, adelboden, etc." />
</div>
</div>
<div class="form-line">
<div class="label">Skier 1</div>
<div class="input">
<input type="text" id="skier-1-input" value="Mathieu" />
</div>
</div>
<div class="form-line">
<div class="label">Skier 2</div>
<div class="input">
<input type="text" id="skier-2-input" value="Emilie" />
</div>
</div>
<div class="form-line">
<div class="label">Number of races</div>
<div class="input">
<input type="number" id="races-number-input" value="2" min="1" max="10"
placeholder="1 to 10" />
</div>
</div>
<button id="setup-completed-button">Start</button>
</div>
</div>
</div>
<div id="event-manager">
<div class="dialog">
<div class="title">Event manager</div>
<div class="dialog-content">
<div class="info-tables">
<div class="section-title">Last results</div>
<div class="header-line">
<div class="number">Race</div>
<div>Track</div>
<div id="skier-1-label"></div>
<div>Gap</div>
<div id="skier-2-label"></div>
</div>
<div id="last-results-container"></div>
<div class="section-title">Actual ranking</div>
<div class="header-line">
<div>Position</div>
<div>Skier</div>
<div>Win(s)</div>
<div>Time</div>
<div>Difference</div>
</div>
<div id="actual-ranking-container"></div>
<div class="section-title">Next races</div>
<div class="header-line">
<div class="number">Race</div>
<div>Track</div>
<div>Skier</div>
<div>Actual record</div>
</div>
<div id="next-races-container"></div>
</div>
<button id="start-race-button">Start</button>
</div>
</div>
</div>
<div id="result">
<div id="position"></div>
<div id="timing"></div>
<button id="back-to-manager">Continue</button>
</div>
<div class="game-container">
<canvas id="game"></canvas>
</div>
<div id="speedometer"></div>
<div id="timer"></div>
</div>
<div class="footer">Imaginated, concepted and executed by une-descente.ch</div>
</div>

</body>

<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="./assets/favicon-DrQSsmaJ.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Retro Ski</title>
<script type="module" crossorigin src="./assets/index-Uohsabmt.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-ufHf_1V0.css">
</head>

<body>
<div class="ui-container">
<div class="header">
Retro ski
</div>
<div class="hud-container">
<div id="event-setup">
<div class="dialog">
<div class="title">Event setup</div>
<div class="dialog-content">
<div class="form-line">
<div class="label">Track</div>
<div class="input">
<input type="text" id="track-input" value="davos" placeholder="davos, adelboden, etc." />
</div>
</div>
<div class="form-line">
<div class="label">Skier 1</div>
<div class="input">
<input type="text" id="skier-1-input" value="Mathieu" />
</div>
</div>
<div class="form-line">
<div class="label">Skier 2</div>
<div class="input">
<input type="text" id="skier-2-input" value="Emilie" />
</div>
</div>
<div class="form-line">
<div class="label">Number of races</div>
<div class="input">
<input type="number" id="races-number-input" value="2" min="1" max="10" placeholder="1 to 10" />
</div>
</div>
<button id="setup-completed-button">Start</button>
</div>
</div>
</div>
<div id="event-manager">
<div class="dialog">
<div class="title">Event manager</div>
<div class="dialog-content">
<div class="info-tables">
<div class="section-title">Last results</div>
<div class="header-line">
<div class="number">Race</div>
<div>Track</div>
<div id="skier-1-label"></div>
<div>Gap</div>
<div id="skier-2-label"></div>
</div>
<div id="last-results-container"></div>
<div class="section-title">Actual ranking</div>
<div class="header-line">
<div>Position</div>
<div>Skier</div>
<div>Win(s)</div>
<div>Time</div>
<div>Difference</div>
</div>
<div id="actual-ranking-container"></div>
<div class="section-title">Next races</div>
<div class="header-line">
<div class="number">Race</div>
<div>Track</div>
<div>Skier</div>
<div>Actual record</div>
</div>
<div id="next-races-container"></div>
</div>
<button id="start-race-button">Start</button>
</div>
</div>
</div>
<div id="result">
<div id="position"></div>
<div id="timing"></div>
<button id="back-to-manager">Continue</button>
</div>
<div class="game-container">
<canvas id="game"></canvas>
</div>
<div id="speedometer"></div>
<div id="timer"></div>
</div>
<div class="footer">Imaginated, concepted and executed by une-descente.ch</div>
</div>
</body>

</html>
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"compilerOptions": {
"baseUrl": "./",
"target": "ESNext",
"useDefineForClassFields": true,
"module": "ESNext",
Expand Down
5 changes: 5 additions & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { defineConfig } from "vite";

export default defineConfig({
base: "./",
});

0 comments on commit 58a609f

Please sign in to comment.