Skip to content

Commit

Permalink
docs added
Browse files Browse the repository at this point in the history
  • Loading branch information
sudo-vaibhav committed Oct 15, 2023
1 parent a30b1b9 commit f75cfa5
Show file tree
Hide file tree
Showing 73 changed files with 8,725 additions and 498 deletions.
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
build
Dockerfile
dist
!public/dist
.astro
37 changes: 37 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build and Deploy
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build and push Docker images
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
# platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x
tags: backroad-docs:latest
outputs: type=docker,dest=/tmp/backroad-docs.tar
cache-from: type=gha
cache-to: type=gha,mode=max
- run: ls -la /tmp
- run: whoami
- name: use ssh agent
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SUDOMAKES_KEY }}
- name: do ssh
env:
HOST: ${{ secrets.SUDOMAKES_HOSTNAME }}
USER: ${{ secrets.SUDOMAKES_USER }}
PORT: ${{ secrets.SUDOMAKES_PORT }}
run: |
scp -o StrictHostKeyChecking=no -P $PORT /tmp/backroad-docs.tar $USER@$HOST:/tmp
ssh -o StrictHostKeyChecking=no -p $PORT $USER@$HOST 'ls -la /tmp/ && docker load --input /tmp/backroad-docs.tar'
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# build output
dist/
dist
!public/dist

# generated types
.astro/

Expand Down
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM node:18-alpine as builder
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
RUN npm run build


FROM lipanski/docker-static-website:latest

COPY --from=builder /app/dist/ ./
EXPOSE 4173
CMD ["/busybox", "httpd", "-f", "-v", "-p", "4173", "-c", "httpd.conf"]


# FROM halverneus/static-file-server as runner
# WORKDIR /app
# COPY
# # RUN npm ci --omit=dev
# ENTRYPOINT [ "/app" ]
# EXPOSE 8080
# CMD []
74 changes: 51 additions & 23 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,30 +1,58 @@
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import { defineConfig } from "astro/config";
import starlight from "@astrojs/starlight";
import react from "@astrojs/react";
import tailwind from "@astrojs/tailwind";

import svelte from "@astrojs/svelte";

// https://astro.build/config
export default defineConfig({
integrations: [starlight({
title: 'My Docs',
social: {
github: 'https://github.com/withastro/starlight'
},
sidebar: [{
label: 'Guides',
items: [
// Each item here is one entry in the navigation menu.
{
label: 'Example Guide',
link: '/guides/example/'
}]
}, {
label: 'Reference',
autogenerate: {
directory: 'reference'
}
}]
}), react(), tailwind(), svelte()]
});
site: "https://backroad.sudomakes.art",
integrations: [
// tailwind(),
starlight({
title: "Backroad",
tableOfContents: false,
social: {
github: "https://github.com/sudomakes/backroad",
},
components: {
ContentPanel: "./src/components/ConditionalPanel.astro",
PageTitle: "./src/components/ConditionalPageTitle.astro",
Footer: "./src/components/ConditionalFooter.astro",
},
logo: {
src: "./src/assets/logo.svg",
},
customCss: [
// Relative path to your custom CSS file
"./src/styles/custom.css",
"./src/tailwind.css",
],
sidebar: [
{
label: "Fundamentals",
autogenerate: { directory: "docs/Fundamentals" },
},
{
label: "API Reference",
autogenerate: { directory: "docs/API Reference" },
},
{
label: "Configuration",
autogenerate: { directory: "docs/Configuration" },
},
{
label: "Internals",
autogenerate: { directory: "docs/Internals" },
},
],
}),
tailwind({
applyBaseStyles: false,
configFile: "./tailwind.config.mjs",
}),
react(),
svelte(),
],
});
Loading

0 comments on commit f75cfa5

Please sign in to comment.