Skip to content

Commit 52d79d8

Browse files
committed
Add Astro project structure and initial pages
1 parent 904167c commit 52d79d8

File tree

10 files changed

+8626
-0
lines changed

10 files changed

+8626
-0
lines changed

.astro/types.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/// <reference types="astro/client" />

.github/workflows/deploy.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Deploy Astro to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Setup Node.js
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: '18'
28+
cache: 'npm'
29+
30+
- name: Install dependencies
31+
run: npm ci
32+
33+
- name: Setup Pages
34+
id: pages
35+
uses: actions/configure-pages@v4
36+
37+
- name: Build with Astro
38+
run: npm run build
39+
env:
40+
NODE_ENV: production
41+
42+
- name: Upload artifact
43+
uses: actions/upload-pages-artifact@v3
44+
with:
45+
path: ./dist
46+
47+
deploy:
48+
environment:
49+
name: github-pages
50+
url: ${{ steps.deployment.outputs.page_url }}
51+
runs-on: ubuntu-latest
52+
needs: build
53+
steps:
54+
- name: Deploy to GitHub Pages
55+
id: deployment
56+
uses: actions/deploy-pages@v4

astro.config.mjs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import { defineConfig } from 'astro/config';
2+
import tailwind from '@astrojs/tailwind';
3+
import mdx from '@astrojs/mdx';
4+
import sitemap from '@astrojs/sitemap';
5+
6+
export default defineConfig({
7+
site: 'https://copyleftdev.github.io',
8+
base: '/sigmos',
9+
integrations: [
10+
tailwind(),
11+
mdx(),
12+
sitemap()
13+
],
14+
markdown: {
15+
shikiConfig: {
16+
theme: 'github-dark-dimmed',
17+
langs: ['javascript', 'typescript', 'rust', 'bash', 'json', 'yaml'],
18+
wrap: true
19+
}
20+
},
21+
vite: {
22+
ssr: {
23+
noExternal: ['@astrojs/prism']
24+
}
25+
}
26+
});

0 commit comments

Comments
 (0)