Maciek Sitkowski
Maciek Sitkowski
  • 4
  • 26 796
Deploy Vite app to GitHub Pages using GitHub Actions
.
🎬 Chapters
0:00 Create Vite project
0:45 Initialize git repository
1:05 Create GitHub repository
2:00 Add deployment workflow
3:33 Inspect deployment workflow on GitHub
4:22 Add write permission to fix failed workflow
5:45 Enable GitHub pages to host the app
6:47 Investigate incorrectly deployed app
7:38 Update Vite config to fix asset links
8:25 Confirm that the app is up and running
☑️ Step-by-step instructions
github.com/sitek94/vite-deploy-demo/tree/main#readme
⚙️ Source code
github.com/sitek94/vite-deploy-demo
🚀 Deployed project
sitek94.github.io/vite-deploy-demo
🔗 My links
macieksitkowski.com
github.com/sitek94
🏞 Thumbnail Photo by @sigmund on Unsplash:
unsplash.com/photos/4CNNH2KEjhc
มุมมอง: 18 573

วีดีโอ

Habit Tracker - Local Development Setup
มุมมอง 8392 ปีที่แล้ว
Instructions that I'm following in the video: github.com/sitek94/habit-tracker-app#getting-started My previous video about Habit Tracker: th-cam.com/video/zIr_d1ZsIGQ/w-d-xo.html Thumbnail Photo by Arnold Francisca on Unsplash: unsplash.com/photos/f77Bh3inUpE
Resume Builder | How to build a resume | React + CSS
มุมมอง 2.4K3 ปีที่แล้ว
GitHub repository: github.com/sitek94/resume-builder The project was bootstrapped with Create React App: create-react-app.dev Svg icons from React Icons: react-icons.github.io/react-icons/ Thumbnail Photo by Saad Salim on Unsplash: unsplash.com/photos/PqRvLsjD_TU
CS50 Final Project - Habit Tracker - React + Material UI + Firebase
มุมมอง 5K4 ปีที่แล้ว
Link: habit-tracker-293718.web.app/ GitHub repository: github.com/sitek94/habit-tracker CS50's Introduction to Computer Science: www.edx.org/course/cs50s-introduction-to-computer-science

ความคิดเห็น

  • @张三-i6n
    @张三-i6n 2 หลายเดือนก่อน

    What should I do if the third-party package cannot be parsed during the build?/(ㄒoㄒ)/~~

    • @张三-i6n
      @张三-i6n 2 หลายเดือนก่อน

      I've solved it and am now trying to deal with static files

    • @张三-i6n
      @张三-i6n 2 หลายเดือนก่อน

      Now the static resource succeeds, but the routing has an error /(ㄒoㄒ)/~~

  • @fwaku3441
    @fwaku3441 4 หลายเดือนก่อน

    Really nice!

  • @krzysztofkrawczynski9404
    @krzysztofkrawczynski9404 4 หลายเดือนก่อน

    That worked great, thank you. I appreciate that you attached step-by-step instructions and workflow script. Well done!

  • @matheusvianam
    @matheusvianam 5 หลายเดือนก่อน

    Thank you!

  • @dpeedits
    @dpeedits 6 หลายเดือนก่อน

    the fix for me was giving permission to github action to write, I spent 3 days searching for a solutions why my website not working, and your video is the only one that worked for me by that simple, yet very important thing, thanks a lot 🙏

  • @alexseeley1146
    @alexseeley1146 6 หลายเดือนก่อน

    This is a godsend - thank you

  • @luiggymacias5735
    @luiggymacias5735 7 หลายเดือนก่อน

    do you still use it as your resume builder?

  • @Fingerstyle-Magazine
    @Fingerstyle-Magazine 8 หลายเดือนก่อน

    Djekuje bardzo sir, you saved my nerves

  • @vuenice
    @vuenice 9 หลายเดือนก่อน

    voice not audable

  • @iaachou
    @iaachou 9 หลายเดือนก่อน

    hello sir!! i had a problem running yarn and couldn't run the project

  • @Andrey-z1k
    @Andrey-z1k 9 หลายเดือนก่อน

    thank you very much, the awesome tutorial

  • @drious
    @drious 10 หลายเดือนก่อน

  • @bartekbinda6978
    @bartekbinda6978 ปีที่แล้ว

    Gratulacje, bardzo ciekawy projekt i świetnie wymyślony ui! 👍

  • @higara_
    @higara_ ปีที่แล้ว

    Finally a well explained video of each step and why we are doing it. Thank you so much for the explanation on the wrong asset links! thumb up and bookmarked for future reference

  • @hamidenajari1159
    @hamidenajari1159 ปีที่แล้ว

    thank you

  • @mblede
    @mblede ปีที่แล้ว

    this looks really cool! is there any chance you can make a video tutorial on how to build this app, after all this time?

  • @echendukwe1510
    @echendukwe1510 ปีที่แล้ว

    i have the same blank page even though i added the baseurl

    • @echendukwe1510
      @echendukwe1510 ปีที่แล้ว

      could it be because i'm using react router?

    • @macieksitkowski
      @macieksitkowski ปีที่แล้ว

      @@echendukwe1510 I've got another example repo with react router setup, maybe it'll help: github.com/sitek94/football-app

  • @agent4525
    @agent4525 ปีที่แล้ว

    Tried so many times it still not working for me. Just cant figure out what went wrong. 😰

    • @macieksitkowski
      @macieksitkowski ปีที่แล้ว

      Hey, you can open an issue in my repo on Github and when I have a minute I'll try to take a look

  • @set_soul
    @set_soul ปีที่แล้ว

    You just saved my day

  • @kenyandev
    @kenyandev ปีที่แล้ว

    had trouble with my github actions and this saved. Thank you Maciek Sitkowski

  • @martinfernandez4467
    @martinfernandez4467 ปีที่แล้ว

    Does this work with Vue Vite? I don't know how to deploy my Vue Vite project on GitHub... Also, it uses a local api that I run myself in the terminal every time. So how would I make that work on GitHub?

  • @blackkenshi222
    @blackkenshi222 ปีที่แล้ว

    Dude you are the best ! I've been trying to solve those errors for days and it worked ! Thank you very much !

  • @sul9343
    @sul9343 ปีที่แล้ว

    Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec

  • @nikunjmahajan4567
    @nikunjmahajan4567 ปีที่แล้ว

    What to change if i want to install packages using yarn

  • @2difficult2do
    @2difficult2do ปีที่แล้ว

    Thank you, your tutorial is great and useful, you helped me very much!

  • @iuriius
    @iuriius ปีที่แล้ว

    thank you very much sir

  • @StartwithEnglish
    @StartwithEnglish ปีที่แล้ว

    deploy is waiting for github-pages deployment approval

  • @Noam-Bahar
    @Noam-Bahar ปีที่แล้ว

    Works flawlessly! Thanks!!!

  • @xXcodephreakXx
    @xXcodephreakXx ปีที่แล้ว

    Works like a charm. Very well explained. Thank you!

  • @zaidtehsin7096
    @zaidtehsin7096 ปีที่แล้ว

    Still not working

    • @macieksitkowski
      @macieksitkowski ปีที่แล้ว

      Hey there, can you send a link to your repo?

  • @m_jdm357
    @m_jdm357 ปีที่แล้ว

    Man that thing again does not work... :(

    • @macieksitkowski
      @macieksitkowski ปีที่แล้ว

      Can you share a link to your repo?

    • @m_jdm357
      @m_jdm357 ปีที่แล้ว

      @@macieksitkowski I ditched Github Pages after days ... days trying. I deployed to Netlify, 0 configuration, just added _redirects file and it worked straight out of the box. I saw a freecodecamp article on how to deploy to netlify with create react app not vite.

  • @csmt12
    @csmt12 ปีที่แล้ว

    I get this error: Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.

    • @macieksitkowski
      @macieksitkowski ปีที่แล้ว

      Hey there, can you send a link to your repo?

    • @csmt12
      @csmt12 ปีที่แล้ว

      @@macieksitkowski Hey, ended up switching to create-react-app in the end. Thanks for the content!

  • @amelianceskymusic
    @amelianceskymusic ปีที่แล้ว

    how to deploy Vite app with react browser router? CRA has fix in official docs, but Vite doesn't have=(

    • @macieksitkowski
      @macieksitkowski ปีที่แล้ว

      Do you mean github.com/remix-run/react-router? I'm pretty sure it should work out of the box, I'm using react router in this app github.com/sitek94/football-app and it works fine.

    • @amelianceskymusic
      @amelianceskymusic ปีที่แล้ว

      @@macieksitkowski I've got 404 after reloading ...football-app/teams page. It's not what you expect=(

    • @macieksitkowski
      @macieksitkowski ปีที่แล้ว

      @@amelianceskymusic Ahhh, I see what you mean. Yeah, it was just a demo, so I didn't handle that, but I've fixed it now. Basically, you need to: 1. Create `404.html` which stores the path that you want to access in sessionStorage and then redirects back to `index.html` 2. In `index.html` before loading app script you check sessionStorage if there is something saved, and if so, you update the path and clear the storage You can check my latest commits here: github.com/sitek94/football-app/commits/main Hope it helps!

  • @RicardoChase894
    @RicardoChase894 ปีที่แล้ว

    awesome man!!!

  • @darellegochuico4398
    @darellegochuico4398 ปีที่แล้ว

    Of all the tutorials, this one worked flawlessly

  • @willitworks
    @willitworks ปีที่แล้ว

    can you do a video on how to deploy with pnpm ?

    • @macieksitkowski
      @macieksitkowski ปีที่แล้ว

      Hey Mike, I've found a repo where I'm using pnpm: github.com/sitek94/football-app/blob/main/.github/workflows/deploy.yml It's all pretty much the same, except for: ``` - name: Setup pnpm uses: pnpm/action-setup@v2.2.2 with: version: 7 - name: Setup Node uses: actions/setup-node@v2 with: node-version: 18.2 cache: 'pnpm' - name: Install dependencies run: pnpm install ``` It's using this action to setup pnpm: github.com/pnpm/action-setup Let me know if it's of any help, and if not I'll create some example. Cheers

  • @vibestation23
    @vibestation23 ปีที่แล้ว

    So how to config when my vite app has routing

    • @macieksitkowski
      @macieksitkowski ปีที่แล้ว

      Hey, you can check this app for more advanced example with routing: github.com/sitek94/football-app

  • @jadmalak1
    @jadmalak1 ปีที่แล้ว

    How can I upload it so people can use it

  • @mdasifmunshe
    @mdasifmunshe ปีที่แล้ว

    Thank You ❤

  • @jagcheema3934
    @jagcheema3934 ปีที่แล้ว

    your awesome thank you man followed every step and it worked just as you explained

  • @MineFanist
    @MineFanist ปีที่แล้ว

    You are a legend my friend. Thanks alot!

  • @main_mercy
    @main_mercy ปีที่แล้ว

    Thanks for your video! It worked very well!

  • @macieksitkowski
    @macieksitkowski ปีที่แล้ว

    Vite's docs for deploying to GitHub Pages: vitejs.dev/guide/static-deploy.html#github-pages Example with a custom domain: github.com/sitek94/vite-deploy-demo-custom-domain

  • @keithprakash9955
    @keithprakash9955 ปีที่แล้ว

    hey Maciek, it worked on demo project.. btw i tried to host a portfolio.. it won't work on it.. just gives a blank page. with a error " Error with Permissions-Policy header: Origin trial controlled feature not enabled: 'interest-cohort'.".. need bit help to fix this issue

    • @macieksitkowski
      @macieksitkowski ปีที่แล้ว

      Hey there, can you share a link to your repo?

    • @keithprakash9955
      @keithprakash9955 ปีที่แล้ว

      @@macieksitkowski yes

    • @macieksitkowski
      @macieksitkowski ปีที่แล้ว

      Did you forget to share it? :D

    • @keithprakash9955
      @keithprakash9955 ปีที่แล้ว

      @@macieksitkowski i hosted it on netlify bro.. im working on a blog .. i ll surely use your help to host it 😃

    • @macieksitkowski
      @macieksitkowski ปีที่แล้ว

      @@keithprakash9955 Netlify is great, I have my personal website there :) Deploying is also super easy, it's described here: vitejs.dev/guide/static-deploy.html#netlify-with-git

  • @emilzyka6853
    @emilzyka6853 ปีที่แล้ว

    Thank you, works great! :)

  • @DavidAsatrian
    @DavidAsatrian ปีที่แล้ว

    Thanks Maciek, this was helpful! I went with 'actions/upload-pages-artifact@v1' and 'actions/deploy-pages@v1' instead of 'peaceiris/actions-gh-pages@v3' so there's no need to upload/download artifact or use a 'gh-pages' branch.

    • @macieksitkowski
      @macieksitkowski ปีที่แล้ว

      Hey David, thanks for the tip, I have to check it out!

  • @elishababalola5895
    @elishababalola5895 ปีที่แล้ว

    Thank You very much man

  • @bernardus3289
    @bernardus3289 ปีที่แล้ว

    Thanks a bunch man, you really saved my neck here

  • @thatsalot3577
    @thatsalot3577 ปีที่แล้ว

    You're a lifesaver man, I pray that you live a happy life.

  • @ConstantineKa
    @ConstantineKa 2 ปีที่แล้ว

    Tell me, the project is on vite, but the package manager is on yarn?

    • @macieksitkowski
      @macieksitkowski 2 ปีที่แล้ว

      In this example I'm using npm, but it wouldn't be a problem to use yarn or pnpm instead

    • @ConstantineKa
      @ConstantineKa 2 ปีที่แล้ว

      @@macieksitkowski Resolve. The problem was fontawersome. They closed access to version 6.2.0. It gave a 404 error. Workflow went into a panic. Changed the yarn.lock file. Now success😀

    • @ConstantineKa
      @ConstantineKa 2 ปีที่แล้ว

      Для русскоязычных. Возникла проблема, когда делал по инструкции. Погрешил что в видео npm, а у меня Yarn. Но в поисках решения заметил где-то, что не может установить библиотеку FontAwersome версии 6.2.0, помечает код ошибки 404. А еще не может найти библиотеку fortawesome/sharp-solid-svg-icons вообще ни какой версии. Аction сразу завершался с ошибкой. Решение-изменить файл yarn.lock (или package.json). Поменял везде(сочетание ctrl+H в любом редакторе😊) на версию 6.2.1 и удалил все упоминания данной библиотеки. Надеюсь кому-то помог)))