Skip to content

Commit

Permalink
Merge pull request #1 from GuangYiDing/master
Browse files Browse the repository at this point in the history
feat: 添加 Github Pages 演示地址
  • Loading branch information
xxss0903 authored Sep 26, 2024
2 parents c7d78cf + d4440f1 commit 9e6913d
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- master # Set a branch name to trigger deployment

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-
- run: npm ci
- run: npm run build

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
1 change: 1 addition & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ import vue from '@vitejs/plugin-vue'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
base: '/drawstamputils/' // Add this line
})

2 comments on commit 9e6913d

@xxss0903
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

发布失败了老哥,这个发布我不太懂,你那能看看是哪里需要修改么

@xxss0903
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Run peaceiris/actions-gh-pages@v3
[INFO] Usage https://github.com/peaceiris/actions-gh-pages#readme
Dump inputs
Setup auth token
Prepare publishing assets
Setup Git config
Create a commit
Push the commit or tag
/usr/bin/git push origin gh-pages
remote: Permission to xxss0903/drawstamputils.git denied to github-actions[bot].
fatal: unable to access 'https://github.com/xxss0903/drawstamputils.git/': The requested URL returned error: 403
Error: Action failed with "The process '/usr/bin/git' failed with exit code 128"

Please sign in to comment.