Skip to content

Commit 0a620f5

Browse files
authored
Initial push (#1)
* Initial push * Fix deployment * Add package-lock.json * Configure index.html and vite * Add debug steps to gh workflow * Try and fix deployment * Add rollup as dev dependency * Add tailwind as dev dependency * Add tailwind as dev dependency * Update package-lock.json * Use different gh actions workflow * Use different gh actions workflow * Test * Fix permissions * Update vite * Try to fix images * Update models and add ResourceEstimatorModel.js * Update models and add ResourceEstimatorModel.js * Update workflow * Update README * Add tag and release pipeline * Add tag and release pipeline v2
1 parent dc07d40 commit 0a620f5

28 files changed

+5011
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Build and deploy site to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: write
12+
pages: write
13+
id-token: write
14+
15+
# Allow one concurrent deployment
16+
concurrency:
17+
group: 'pages'
18+
cancel-in-progress: true
19+
20+
jobs:
21+
# Single deploy job since we're just deploying
22+
deploy:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
28+
- name: Set up Node
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: 20
32+
cache: 'npm'
33+
34+
- name: Install dependencies
35+
run: npm install
36+
37+
- name: Build
38+
run: npm run build
39+
40+
- name: Publish to gh-pages
41+
uses: JamesIves/github-pages-deploy-action@4.1.4
42+
with:
43+
branch: gh-pages
44+
folder: dist
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Create tag and release
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'CHANGELOG.rst'
7+
push:
8+
branches:
9+
- main
10+
paths:
11+
- 'CHANGELOG.rst'
12+
13+
jobs:
14+
check_version:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
- name: Check version in changelog
22+
run: bash ./tag-from-pipeline.sh verify_changelog_version
23+
24+
create_tag_and_release:
25+
needs: check_version
26+
runs-on: ubuntu-latest
27+
if: ${{ github.ref == 'refs/heads/main' }}
28+
29+
steps:
30+
- uses: actions/checkout@v4
31+
with:
32+
fetch-depth: 0
33+
- name: Create new tag and release
34+
run: bash ./tag-from-pipeline.sh create_new_tag
35+
env:
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

CHANGELOG.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
=========
2+
Changelog
3+
=========
4+
5+
Version 0.1.0
6+
============
7+
8+
* Python 3.10 support is deprecated and will be removed in the future.
9+
`#173 <https://github.com/iqm-finland/iqm-client/pull/173>`_

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# FiQCI Resource estimator
2+
3+
Simple web app to estimate how many QPU seconds a job takes based on a model.
4+
5+
## Web Application
6+
7+
The web application uses React and TailwindCSS. You can build the static files with
8+
9+
```bash
10+
npm run build
11+
```
12+
13+
For local development you can use
14+
15+
```bash
16+
npm run dev
17+
```
18+
19+
## Deployment
20+
21+
The app is deployed automatically with GitHub pages. The Github workflow [`deploy.yml`](./.github/workflows/deploy.yml) builds the static files and uploads the `dist` folder to the git branch `gh-pages` . Github pages is configured to deploy from `gh-pages` branch.

eslint.config.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import js from '@eslint/js'
2+
import globals from 'globals'
3+
import reactHooks from 'eslint-plugin-react-hooks'
4+
import reactRefresh from 'eslint-plugin-react-refresh'
5+
6+
export default [
7+
{ ignores: ['dist'] },
8+
{
9+
files: ['**/*.{js,jsx}'],
10+
languageOptions: {
11+
ecmaVersion: 2020,
12+
globals: globals.browser,
13+
parserOptions: {
14+
ecmaVersion: 'latest',
15+
ecmaFeatures: { jsx: true },
16+
sourceType: 'module',
17+
},
18+
},
19+
plugins: {
20+
'react-hooks': reactHooks,
21+
'react-refresh': reactRefresh,
22+
},
23+
rules: {
24+
...js.configs.recommended.rules,
25+
...reactHooks.configs.recommended.rules,
26+
'no-unused-vars': ['error', { varsIgnorePattern: '^[A-Z_]' }],
27+
'react-refresh/only-export-components': [
28+
'warn',
29+
{ allowConstantExport: true },
30+
],
31+
},
32+
},
33+
]

index.html

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" href="./favicon.png" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
7+
<title>FiQCI Resource Estimator</title>
8+
<style>
9+
/* Critical CSS to ensure proper sizing */
10+
html, body {
11+
margin: 0;
12+
padding: 0;
13+
width: 100%;
14+
height: 100%;
15+
overflow-x: hidden;
16+
background-color: #eeeeee !important;
17+
font-family: -apple-system,BlinkMacSystemFont,"Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif !important;
18+
}
19+
#root {
20+
width: 100% !important;
21+
max-width: 100% !important;
22+
padding: 0 !important;
23+
margin: 0 !important;
24+
box-sizing: border-box !important;
25+
}
26+
</style>
27+
</head>
28+
<body>
29+
<div id="root"></div>
30+
<script type="module" src="./src/main.jsx"></script>
31+
</body>
32+
</html>

0 commit comments

Comments
 (0)