Skip to content

Commit

Permalink
Merge pull request #29 from minnoroth/rebuild-index
Browse files Browse the repository at this point in the history
Rebuild index page.
  • Loading branch information
pavelhoral authored Mar 25, 2024
2 parents eb5f922 + a4de0fe commit 23ce216
Show file tree
Hide file tree
Showing 12 changed files with 884 additions and 446 deletions.
63 changes: 45 additions & 18 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,53 @@
name: deploy
name: Deploy VitePress site to Pages

on:
push:
branches:
- main
branches: [main]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: false


jobs:
build:
runs-on: ubuntu-latest
name: Build
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Install dependencies
run: npm ci
- name: Build with VitePress
run: npm run site:build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: site/.vitepress/dist

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
name: Deploy
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '17'
cache: 'npm'
- run: npm install
- run: npm run site:build
- run: |
git config --global user.name 'wrensecurity'
git config --global user.email 'wrensecurity@users.noreply.github.com'
cd site/.vitepress/dist
git init && git checkout -b main
git add -A
git commit -m 'Deploy ${{ github.sha }}'
git push -f https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/WrenSecurity/wrensecurity.org.git main:gh-pages
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
851 changes: 456 additions & 395 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"glob": "^8.0.1",
"gray-matter": "^4.0.3",
"typescript": "^4.8.4",
"vitepress": "^1.0.0-rc.40",
"vitepress": "^1.0.1",
"vue-eslint-parser": "^9.1.0"
}
}
2 changes: 1 addition & 1 deletion site/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default defineConfig({
]
],
themeConfig: {
logo: '/wren.png',
logo: '/navbar-logo.png',
footer: {
copyright: 'Copyright © 2017-2024 Wren Security'
},
Expand Down
24 changes: 24 additions & 0 deletions site/.vitepress/theme/components/index/Feature.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<template>
<div class="wren-feature">
<h3>
<slot name="title" />
</h3>
<p>
<slot name="description" />
</p>
</div>
</template>

<style scoped>
.wren-feature {
background-color: var(--vp-c-bg-soft);
padding: 24px;
border-radius: 12px;
}
.wren-feature h3 {
margin: 0;
}
.wren-feature p {
margin-bottom: 0;
}
</style>
32 changes: 32 additions & 0 deletions site/.vitepress/theme/components/index/Features.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<script setup>
defineProps({
columns: { type: Number, required: true }
});
</script>

<template>
<div class="wren-features">
<slot />
</div>
</template>

<style scoped>
.wren-features {
display: grid;
grid-template-columns: repeat(v-bind(columns), 1fr);
gap: 16px;
margin-top: 42px;
}
@media (max-width: 960px) {
.wren-features {
grid-template-columns: repeat(2, 1fr);
}
}
@media (max-width: 480px) {
.wren-features {
grid-template-columns: 1fr;
}
}
</style>
Loading

0 comments on commit 23ce216

Please sign in to comment.