Manual Deploy to GitHub Pages #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |