Skip to content

Manual Deploy to GitHub Pages #1

Manual Deploy to GitHub Pages

Manual Deploy to GitHub Pages #1

Workflow file for this run

name: Manual Deploy to GitHub Pages
on:
workflow_dispatch:
inputs:
theme:
description: "Select a theme (github, retro, screen)"
required: true
default: "github"
type: choice
options:
- github
- retro
- screen
title:
description: "Set the page title"
required: true
type: string
# Add permissions for the workflow
permissions:
contents: write
pages: write
id-token: write
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 24
- name: Install dependencies
run: npm ci
- name: Build project
env:
NODE_ENV: production
GITHUB_REPOSITORY: ${{ github.repository }}
VITE_CV_THEME: ${{ github.event.inputs.theme }}
VITE_PAGE_TITLE: ${{ github.event.inputs.title }}
run: |
echo "Building for repository: $GITHUB_REPOSITORY"
echo "Using theme: $VITE_CV_THEME"
echo "Using page title: $VITE_PAGE_TITLE"
npm run build
cp dist/index.html dist/404.html
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: dist
branch: gh-pages