Skip to content

Commit

Permalink
Merge pull request #25 from BetterDiscord/vitepress
Browse files Browse the repository at this point in the history
Convert to VitePress
  • Loading branch information
zerebos authored Dec 1, 2024
2 parents acafb2a + 7d8bc17 commit f44eeba
Show file tree
Hide file tree
Showing 167 changed files with 8,867 additions and 14,905 deletions.
87 changes: 0 additions & 87 deletions .eslintrc

This file was deleted.

102 changes: 66 additions & 36 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,66 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- main

jobs:
build:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: 16
cache: npm

- name: Install Dependencies
run: npm ci

- name: Build Documentation
run: npm run build

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build
cname: docs.betterdiscord.app
commit_message: Deploying github pages @
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com
name: Deploy to GitHub Pages

# Auto generate on a push to main, also allow manually triggering
on:
push:
branches:
- main
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write


# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: pages
cancel-in-progress: false


jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Not needed if lastUpdated is not enabled

- name: Use Node.js 20
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 Documentation
run: npm run build

- name: Upload Artifact
uses: actions/upload-pages-artifact@v3
with:
path: .vitepress/dist


# Deployment job
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
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
/node_modules

# Production
/build
.vitepress/dist

# Generated files
.docusaurus
.cache-loader
.vitepress/cache

# Misc
.DS_Store
Expand Down
Loading

0 comments on commit f44eeba

Please sign in to comment.