Skip to content

Commit

Permalink
ci: added gh-pages script
Browse files Browse the repository at this point in the history
  • Loading branch information
kaandesu committed Oct 5, 2024
1 parent 2b2fb3a commit 5f05b22
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Deploy Production

on:
push:
branches:
- "main"

jobs:
build:
runs-on: ubuntu-20.04

name: Build and Deploy to GitHub Pages
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"

- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_ENV
- name: Install dependencies
run: pnpm install

- name: Build the project
run: pnpm build --preset github_pages

- name: Generate the static site
run: pnpm generate

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: .output/public

0 comments on commit 5f05b22

Please sign in to comment.