Skip to content

Ignore local photo upload folder #24

Ignore local photo upload folder

Ignore local photo upload folder #24

Workflow file for this run

name: Build to blog
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: write
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout main
uses: actions/checkout@v4
with:
ref: main
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '18.20.8'
cache: npm
- name: Install dependencies
env:
NPM_CONFIG_REGISTRY: https://registry.npmjs.org/
run: |
set -euo pipefail
node -v
npm -v
npm ci --include=dev --no-audit --no-fund
test -f node_modules/vite/package.json
- name: Build
env:
NODE_ENV: development
run: npm run build
- name: Add 404 fallback
run: cp dist/index.html dist/404.html
- name: Publish dist to blog
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: blog
publish_dir: ./dist
force_orphan: true