Skip to content

Commit

Permalink
deploy: github pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Octobug committed Oct 29, 2023
1 parent 17c898c commit 01fc442
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Deploy site to GitHub Pages

on:
push:
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
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Install dependencies
run: npm ci
- name: Build with VitePress
run: |
npm run build
touch .vitepress/dist/.nojekyll
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: .vitepress/dist

deploy:
environment:
name: production
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@v2
2 changes: 2 additions & 0 deletions .vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { defineConfig } from "vitepress";
export default defineConfig({
title: "🐳 WhaleVocal",
description: "Octobug's blog.",
cleanUrls: true,
srcDir: "posts",
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
nav: [
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 01fc442

Please sign in to comment.