feat(pages): use pages action
This commit is contained in:
21
.github/workflows/gh-pages.yaml
vendored
21
.github/workflows/gh-pages.yaml
vendored
@@ -1,8 +1,8 @@
|
|||||||
name: Build release and push to Github
|
name: Build release and push to Github
|
||||||
|
|
||||||
# on:
|
on:
|
||||||
# push:
|
push:
|
||||||
# branches: [ main ]
|
branches: [ main ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -24,12 +24,11 @@ jobs:
|
|||||||
run: pnpm run build-all
|
run: pnpm run build-all
|
||||||
- name: Build directory
|
- name: Build directory
|
||||||
run: pnpm run vite:directory:build
|
run: pnpm run vite:directory:build
|
||||||
- name: Deploy
|
- name: Publish to Cloudflare Pages
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: cloudflare/pages-action@v1
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||||
publish_dir: ./release
|
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||||
cname: arknights.halyul.dev
|
projectName: aklive2d
|
||||||
allow_empty_commit: true
|
directory: release
|
||||||
user_name: 'github-actions[bot]'
|
wranglerVersion: '3'
|
||||||
user_email: 'github-actions[bot]@users.noreply.github.com'
|
|
||||||
|
|||||||
@@ -20,8 +20,7 @@
|
|||||||
"vite:directory:dev": "vite dev",
|
"vite:directory:dev": "vite dev",
|
||||||
"vite:directory:build": "vite build",
|
"vite:directory:build": "vite build",
|
||||||
"vite:directory:preview": "vite preview",
|
"vite:directory:preview": "vite preview",
|
||||||
"offical_update": "node aklive2d offical_update",
|
"offical_update": "node aklive2d offical_update"
|
||||||
"cf:pages": "npm run build-all && npm run vite:directory:build"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@perfsee/rollup": "^1.10.0",
|
"@perfsee/rollup": "^1.10.0",
|
||||||
|
|||||||
Reference in New Issue
Block a user