reowrked the static/standalone version and migrated to cloudflare pages
This commit is contained in:
1 parent
49c79b31a9
commit
9442868a8b
7 files changed
+131
-39
No files matched your search
@@ -1,8 +1,10 @@
|
||||
name: Deploy Vite site to Pages
|
||||
name: Redirect GitHub Pages to Cloudflare
|
||||
|
||||
# The site lives on Cloudflare now; GitHub Pages only forwards old links.
|
||||
on:
|
||||
push:
|
||||
branches: ["main"]
|
||||
paths: ["gh-pages/**", ".github/workflows/deploy.yml"]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
@@ -15,34 +17,17 @@ concurrency:
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "22"
|
||||
cache: npm
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@v5
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Build
|
||||
run: npm run build
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: ./dist
|
||||
|
||||
deploy:
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
- uses: actions/checkout@v4
|
||||
- run: cp gh-pages/index.html gh-pages/404.html
|
||||
- uses: actions/configure-pages@v5
|
||||
- uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: ./gh-pages
|
||||
- id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
Reference in new issue
Block a user