Skip to content
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

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from
Open

deploy to github pages #745

wants to merge 5 commits into from

Conversation

psy21d
Copy link
Collaborator

@psy21d psy21d commented Mar 20, 2025

deploy_how_to

please a little attention to this screenshot

@psy21d psy21d requested a review from a team as a code owner March 20, 2025 21:54
Copy link

vercel bot commented Mar 20, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
adamant-im ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 21, 2025 1:49pm

Copy link

github-actions bot commented Mar 20, 2025

Deployed to https://msg-adamant-pr-745.surge.sh 🚀

Comment on lines 15 to 16
- name: Debug dist folder
run: ls -R ./dist
Copy link
Member

Choose a reason for hiding this comment

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

Remove debug step

Copy link
Member

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.

Comment on lines +17 to +18
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
Copy link
Member

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

Comment on lines +13 to +14
GITHUB_REPO_NAME: ${{ github.event.repository.name }}
VITE_GITHUB_REPO_NAME: /${{ github.event.repository.name }}
Copy link
Member

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?

Copy link
Member

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.

Comment on lines 15 to 23
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}/`;
}
Copy link
Member

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?

Copy link
Member

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 ?? "/"

@bludnic bludnic requested a review from a team March 20, 2025 22:22
Comment on lines +13 to +14
GITHUB_REPO_NAME: ${{ github.event.repository.name }}
VITE_GITHUB_REPO_NAME: /${{ github.event.repository.name }}
Copy link
Member

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.

Comment on lines 15 to 16
- name: Debug dist folder
run: ls -R ./dist
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants