forked from phc/website
Add drone file, cleanup Astro config
This commit is contained in:
+49
@@ -0,0 +1,49 @@
|
||||
# This file defines a Drone pipeline that builds a static website with "npm run build". This
|
||||
# pipeline must be marked as "Trusted" in the Drone project settings.
|
||||
#
|
||||
# We mount the target directory of the project at "/var/www/{project}" to the container
|
||||
# "dist/" directory and the run the build. A caveat is that the container builds files
|
||||
# with "root" permissions, so we need to fix those after each build with a second pipeline.
|
||||
|
||||
kind: pipeline
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: deploy
|
||||
image: node:latest
|
||||
volumes:
|
||||
- name: host-website-dist
|
||||
path: /drone/src/dist
|
||||
commands:
|
||||
- npm install
|
||||
- npm run build
|
||||
|
||||
volumes:
|
||||
- name: host-website-dist
|
||||
host: # this volume is mounted on the host machine
|
||||
path: /var/www/website
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- main
|
||||
event:
|
||||
- push
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: exec # this job is executed on the host machine
|
||||
name: caddy-permissions
|
||||
|
||||
depends_on:
|
||||
- default
|
||||
|
||||
steps:
|
||||
- name: chown
|
||||
commands:
|
||||
- chown -R caddy:caddy /var/www/website
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- main
|
||||
event:
|
||||
- push
|
||||
@@ -21,6 +21,3 @@ pnpm-debug.log*
|
||||
|
||||
# macOS-specific files
|
||||
.DS_Store
|
||||
|
||||
# Drizzle build output
|
||||
out/
|
||||
|
||||
+1
-14
@@ -1,13 +1,8 @@
|
||||
import { defineConfig } from 'astro/config'
|
||||
import preact from '@astrojs/preact'
|
||||
import node from '@astrojs/node'
|
||||
|
||||
import mdx from '@astrojs/mdx'
|
||||
|
||||
import remarkToc from 'remark-toc'
|
||||
import rehypeSlug from 'rehype-slug'
|
||||
import rehypeAutolinkHeadings from 'rehype-autolink-headings'
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
server: {
|
||||
@@ -19,13 +14,5 @@ export default defineConfig({
|
||||
},
|
||||
},
|
||||
integrations: [preact(), mdx()],
|
||||
// adapter: node({
|
||||
// mode: 'standalone',
|
||||
// }),
|
||||
output: 'hybrid',
|
||||
outDir: './out/astro',
|
||||
build: {
|
||||
client: './out/astro/client',
|
||||
server: './out/astro/server',
|
||||
},
|
||||
output: 'static'
|
||||
})
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
"@fontsource/source-sans-pro": "^5.0.8",
|
||||
"@fontsource/space-mono": "^5.0.20",
|
||||
"@preact/signals": "^1.3.0",
|
||||
"@types/jsdom": "^21.1.7",
|
||||
"astro": "^4.15.11",
|
||||
"fuse.js": "^7.0.0",
|
||||
"katex": "^0.16.9",
|
||||
|
||||
Reference in New Issue
Block a user