VitePress is a Static Site Generator(SSG) designed for building fast, content-centric websites. In a nutshell, VitePress takes your source content written in Markdown, applies a theme to it, and generates static HTML pages that can be easily deployed anywhere.
┌ Welcome to VitePress! │ ◇ Where should VitePress initialize the config? │ ./docs │ ◇ Site title: │ My Awesome Project │ ◇ Site description: │ A VitePress Site │ ◆ Theme: │ ● Default Theme (Out of the box, good-looking docs) │ ○ Default Theme + Customization │ ○ Custom Theme └
# Sample workflow for building and deploying a VitePress site to GitHub Pages # name: Deploy VitePress site to Pages
on: # Runs on pushes targeting the `main` branch. Change this to `master` if you're # using the `master` branch as the default branch. push: branches: [main]
# Allows you to run this workflow manually from the Actions tab 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 job build: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 with: fetch-depth: 0 # Not needed if lastUpdated is not enabled # - uses: pnpm/action-setup@v2 # Uncomment this if you're using pnpm # - uses: oven-sh/setup-bun@v1 # Uncomment this if you're using Bun - name: Setup Node uses: actions/setup-node@v3 with: node-version: 18 cache: npm # or pnpm / yarn - name: Setup Pages uses: actions/configure-pages@v3 - name: Install dependencies run: npm ci # or pnpm install / yarn install / bun install - name: Build with VitePress run: | npm run docs:build # or pnpm docs:build / yarn docs:build / bun run docs:build touch docs/.vitepress/dist/.nojekyll - name: Upload artifact uses: actions/upload-pages-artifact@v2 with: path: docs/.vitepress/dist
**First Step: Checking if we already have the public SSH key.**
1. Open Terminal. 2. Enter `ls -al ~/.ssh` to see if existing SSH keys are present:
Check the directory list to see if you already have a public SSH key. Default public is one of the following d_dsa.pub, id_ecdsa.pub, id_ed25519.pub, id_rsa.pub.
If you don't find then go to step 2 otherwise follow step 3
**Step 2: Generating public SSH key**
1. Open Terminal. 2. Enter the following command with a valid email address that you use for github `ssh-keygen -t rsa -b 4096 -C "your_email@example.com"` 3. You will see the following in your terminal `Generating public/private rsa key pair`. When it prompts to`"Enter a file in which to save the key,"` press Enter. This accepts the default file location. When it prompts to `Enter a file in which to save the key (/Users/you/.ssh/id_rsa): [Press enter]` Just press enter again. 4. At the prompt, `"Type a secure passphrase. Enter passphrase (empty for no passphrase): [Type a passphrase]"` press enter if you don't want to `Enter same passphrase again: [Type passphrase again]` press enter again
This will generate `id_rsa.pub`
**Step 3: Adding your SSH key to the ssh-agent**
1. Interminal type `eval "$(ssh-agent -s)"` 2. Add your SSH key to the ssh-agent. If you are using an existing SSH key rather than generating a new SSH key, you'll need to replace id_rsa in the command with the name of your existing private key file. Enter this command `$ ssh-add -K ~/.ssh/id_rsa` 3. Now copy the SSH key and also add it to you github account 4. In terminal enter this command with your ssh file name `pbcopy < ~/.ssh/id_rsa.pub`This will copy the file to your clipboard Now open you github account Go to **Settings > SSH and GPG keys > New SSH key** Enter title and paste the key from clipboard and save it. Voila you're done.