Skip to content

Commit

Permalink
improve app code
Browse files Browse the repository at this point in the history
  • Loading branch information
andrej-dyck committed Jul 1, 2024
1 parent ab1f1c3 commit 4984441
Show file tree
Hide file tree
Showing 16 changed files with 797 additions and 281 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 8
version: 9
- uses: actions/setup-node@v4
with:
node-version: 20
Expand All @@ -29,9 +29,3 @@ jobs:
run: pnpm test
- name: Build
run: pnpm build
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: dist
path: ./dist/
retention-days: 1
43 changes: 26 additions & 17 deletions .github/workflows/deploy-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,35 @@ permissions:
id-token: write

jobs:
deploy-pages:
build:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Dependencies
run: pnpm i
- name: Build
run: pnpm build:gh-pages

deploy-pages:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: dist
path: ./dist/
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ github.token }}
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload Pages Artifact
uses: actions/upload-pages-artifact@v3
with:
path: './dist'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload Pages Artifact
uses: actions/upload-pages-artifact@v3
with:
path: './dist'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"build:gh-pages": "tsc && vite build --base=/endoflife-radar",
"typecheck": "tsc",
"lint": "eslint . --report-unused-disable-directives --max-warnings 0",
"test": "vitest run",
Expand All @@ -28,6 +29,9 @@
"devDependencies": {
"@eslint/compat": "1.1.0",
"@eslint/js": "9.6.0",
"@testing-library/dom": "10.2.0",
"@testing-library/jest-dom": "6.4.6",
"@testing-library/react": "16.0.0",
"@types/eslint": "8.56.10",
"@types/react": "18.3.3",
"@types/react-dom": "18.3.0",
Expand All @@ -38,6 +42,7 @@
"eslint-plugin-react-hooks": "4.6.2",
"eslint-plugin-tailwindcss": "3.17.4",
"globals": "15.7.0",
"jsdom": "24.1.0",
"postcss": "8.4.39",
"postcss-load-config": "6.0.1",
"react": "18.3.1",
Expand Down
Loading

0 comments on commit 4984441

Please sign in to comment.