Skip to content

Commit c2c1039

Browse files
committed
Add support for GitHub Pages UI
1 parent d0137d8 commit c2c1039

16 files changed

Lines changed: 8037 additions & 0 deletions

File tree

β€Ž.github/dependabot.ymlβ€Ž

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,8 @@ updates:
99
directory: '/'
1010
schedule:
1111
interval: 'weekly'
12+
13+
- package-ecosystem: 'npm'
14+
directory: '/ui'
15+
schedule:
16+
interval: 'weekly'

β€Ž.github/workflows/ci.ymlβ€Ž

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ on:
88

99
permissions:
1010
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: "pages"
16+
cancel-in-progress: false
1117

1218
jobs:
1319
python-build:
@@ -43,3 +49,38 @@ jobs:
4349
with:
4450
files: ./coverage.xml
4551
token: ${{ secrets.CODECOV_TOKEN }}
52+
53+
deploy-ui:
54+
name: Deploy Astro UI to GitHub Pages
55+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
56+
needs: python-build
57+
runs-on: ubuntu-latest
58+
environment:
59+
name: github-pages
60+
url: ${{ steps.deployment.outputs.page_url }}
61+
steps:
62+
- name: Checkout code
63+
uses: actions/checkout@v7
64+
- name: Set up Python
65+
uses: actions/setup-python@v6
66+
with:
67+
python-version: '3.14'
68+
- name: Set up Node.js
69+
uses: actions/setup-node@v4
70+
with:
71+
node-version: 22
72+
cache: 'npm'
73+
cache-dependency-path: ui/package-lock.json
74+
- name: Install dependencies
75+
run: npm ci
76+
working-directory: ui
77+
- name: Build site
78+
run: npm run build
79+
working-directory: ui
80+
- name: Upload Pages artifact
81+
uses: actions/upload-pages-artifact@v3
82+
with:
83+
path: ui/dist
84+
- name: Deploy to GitHub Pages
85+
id: deployment
86+
uses: actions/deploy-pages@v4

β€Žui/.gitignoreβ€Ž

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.astro/
2+
node_modules/
3+
dist/
4+
src/data/

β€Žui/astro.config.mjsβ€Ž

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { defineConfig } from 'astro/config';
2+
3+
export default defineConfig({
4+
site: 'https://sambyte.net',
5+
base: '/ultimate-python',
6+
output: 'static',
7+
});

0 commit comments

Comments
Β (0)