Skip to content

Commit

Permalink
ci: updating the GitHub Pages deployment workflow and vitePress confi…
Browse files Browse the repository at this point in the history
…guration
  • Loading branch information
imoyy committed Aug 9, 2024
1 parent 7c4d42d commit 18b9015
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
28 changes: 15 additions & 13 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,19 @@ on:
branches: [main]
pull_request:
branches: [main]

workflow_dispatch:

permissions:
write-all
contents: write

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x]

steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -34,25 +35,26 @@ jobs:

- name: Cache pnpm modules
uses: actions/cache@v4
env:
cache-name: cache-pnpm-modules
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
key: ${{ runner.os }}-build-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-
${{ runner.os }}-build-
- name: Install dependencies
run: pnpm install

- name: Build project
run: pnpm run build
env:
BASE_URL: /${{ github.event.repository.name }}/

- name: Setup Pages
uses: actions/configure-pages@v3

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: .vitepress/dist
env:
CI: true
publish_dir: .vitepress/dist
2 changes: 1 addition & 1 deletion .vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { defineConfig } from 'vitepress'

// https://vitepress.dev/reference/site-config
export default defineConfig({
base: '/raycast-unblock/',
base: '/ray.pro-docs/',
title: 'Raycast Unblock',
lastUpdated: true,
metaChunk: true,
Expand Down

0 comments on commit 18b9015

Please sign in to comment.