Skip to content

Commit 21f2b45

Browse files
committed
refactoring: migrate to Astro
1 parent 3beaed3 commit 21f2b45

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+11407
-3329
lines changed

.github/workflows/ci.yaml

+22-14
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,32 @@ name: CI
22

33
on:
44
push:
5+
branches: [ dev ]
6+
workflow_dispatch:
57
pull_request:
68

9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
714
jobs:
815
build:
916
runs-on: ubuntu-latest
10-
environment: github-pages
17+
steps:
18+
- name: Checkout your repository using git
19+
uses: actions/checkout@v4
20+
- name: Install, build, and upload your site
21+
uses: withastro/action@v2
1122

23+
deploy:
24+
if: ${{ github.ref == 'refs/heads/dev' && github.event_name != 'pull_request' && github.repository == 'lyontechhub/lyontechhub.github.io' }}
25+
needs: build
26+
runs-on: ubuntu-latest
27+
environment:
28+
name: github-pages
29+
url: ${{ steps.deployment.outputs.page_url }}
1230
steps:
13-
- uses: actions/checkout@v3
14-
- name: Setup NodeJS
15-
uses: actions/setup-node@v3
16-
with:
17-
node-version: 20.x
18-
- run: npm ci
19-
- run: npm run build
20-
- name: Deploy
21-
if: ${{ github.ref == 'refs/heads/dev' && github.event_name != 'pull_request' && github.repository == 'lyontechhub/lyontechhub.github.io' }}
22-
uses: peaceiris/actions-gh-pages@v3
23-
with:
24-
github_token: ${{ secrets.GITHUB_TOKEN }}
25-
publish_dir: ./public
31+
- name: Deploy to GitHub Pages
32+
id: deployment
33+
uses: actions/deploy-pages@v4

.gitignore

+25-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,30 @@
1-
node_modules
2-
public
1+
# build output
2+
dist/
33

4-
# Ignore OSX' garbage
5-
.DS_Store
4+
# generated types
5+
.astro/
6+
7+
# dependencies
8+
node_modules/
9+
10+
# logs
11+
npm-debug.log*
12+
yarn-debug.log*
13+
yarn-error.log*
14+
pnpm-debug.log*
15+
16+
# environment variables
17+
.env
18+
.env.production
619

720
#ignore thumbnails created by windows
821
Thumbs.db
22+
23+
# macOS-specific files
24+
.DS_Store
25+
26+
# jetbrains setting folder
27+
.idea/
28+
29+
# direnv/nix
930
.direnv

.vscode/extensions.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"recommendations": ["astro-build.astro-vscode"],
3+
"unwantedRecommendations": []
4+
}

.vscode/launch.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"command": "./node_modules/.bin/astro dev",
6+
"name": "Development server",
7+
"request": "launch",
8+
"type": "node-terminal"
9+
}
10+
]
11+
}

__dirname.ts

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { dirname } from 'path';
2+
import { fileURLToPath } from 'url';
3+
4+
const __dirname = dirname(fileURLToPath(import.meta.url));
5+
6+
export default __dirname;

astro.config.mjs

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { defineConfig } from 'astro/config';
2+
3+
// https://astro.build/config
4+
export default defineConfig({
5+
ntegrations: [],
6+
site: 'https://www.lyontechhub.org',
7+
base: '/',
8+
});

css/bootstrap.less

-50
This file was deleted.

css/main.less

-226
This file was deleted.

0 commit comments

Comments
 (0)