Skip to content

Commit

Permalink
ci
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonkuhrt committed Aug 16, 2024
1 parent 0861506 commit 880d593
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 5 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/deploy-website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Deploy Website
on:
push:
branches: [main]
# Allows us to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: deploy-website
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Not needed if lastUpdated is not enabled
- uses: pnpm/action-setup@v3 # Uncomment this if you're using pnpm
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Install Dependencies
working-directory: website
run: cd website pnpm install
- name: Build
working-directory: website
run: cd website pnpm build # or pnpm docs:build / yarn docs:build / bun run docs:build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: website/.vitepress/dist
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 2 additions & 0 deletions website/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import { defineConfig } from 'vitepress'
export default defineConfig({
title: 'Graffle',
description: 'Minimalist Progressively Type Safe GraphQL Client For JavaScript.',
// TODO, remove before going live.
ignoreDeadLinks: true,
markdown: {
codeTransformers: [
transformerTwoslash({
Expand Down
2 changes: 1 addition & 1 deletion website/.vitepress/theme/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@
.outline-title {
/* If we make it display:none then we break the active border indicator alignment. So just visually hide. */
opacity: 0;
margin-top: -1.5rem;
margin-top: -1.6rem;
}
2 changes: 1 addition & 1 deletion website/content/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ hero:
link: /overview/introduction
- theme: alt
text: Examples
link: /examples
link: /examples/rawString
features:
- title: Opt-in Generation
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
Expand Down
File renamed without changes
File renamed without changes
6 changes: 3 additions & 3 deletions website/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"type": "module",
"scripts": {
"docs:dev": "vitepress dev",
"docs:build": "vitepress build",
"docs:preview": "vitepress preview"
"dev": "vitepress dev",
"build": "vitepress build",
"preview": "vitepress preview"
},
"devDependencies": {
"vitepress": "^1.3.2"
Expand Down

0 comments on commit 880d593

Please sign in to comment.