-
-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deploy to github pages #745
base: dev
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Deployed to https://msg-adamant-pr-745.surge.sh 🚀 |
.github/workflows/github-pages.yml
Outdated
- name: Debug dist folder | ||
run: ls -R ./dist |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove debug step
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not fixed. Remove the step at all. Don't comment it.
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not using the official GitHub action actions/deploy-pages
?
https://github.com/actions/deploy-pages
GITHUB_REPO_NAME: ${{ github.event.repository.name }} | ||
VITE_GITHUB_REPO_NAME: /${{ github.event.repository.name }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure you need both ENV variables? Can you explain why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not fixed. Remove GITHUB_REPO_NAME
if you don't use it.
vite-base.config.ts
Outdated
import dotenv from 'dotenv'; | ||
// Загрузка переменных из .env | ||
dotenv.config(); | ||
|
||
let additional_asset_address = '/'; | ||
|
||
if (process.env.GITHUB_REPO_NAME) { | ||
additional_asset_address = `/${process.env.GITHUB_REPO_NAME}/`; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you import dotenv
here if you can just use process.env.GITHUB_REPO_NAME
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simplify the code, e.g.:
const publicBasePath = process.env.GITHUB_REPO_NAME ?? "/"
GITHUB_REPO_NAME: ${{ github.event.repository.name }} | ||
VITE_GITHUB_REPO_NAME: /${{ github.event.repository.name }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not fixed. Remove GITHUB_REPO_NAME
if you don't use it.
.github/workflows/github-pages.yml
Outdated
- name: Debug dist folder | ||
run: ls -R ./dist |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not fixed. Remove the step at all. Don't comment it.
please a little attention to this screenshot