In this video, we are going to deploy a Next.js (SSG) application to GitHub Pages using GitHub Actions (CI/CD).
Make sure you can run "npm run build && npm run export" in your application. Only Static sites/applications can be deployed to GitHub Pages. If you need a server running (because you use getInitialProps, getServerSideProps or fallback:true) you may consider other options like Vercel, Azure, AWS, etc...
During the video, we will see how to use environment variables in GitHub actions as well.
----
Timeline:
00:00 Introduction
01:25 GitHub Actions first steps
06:21 First GitHub Actions job completed
06:54 Setup GitHub Pages in repository settings
08:10 See the results of the first deployment
08:57 Next.js assetPrefix explanation
09:52 Next.js basePath explanation
10:38 Implement assetPrefix and basePath in next.config.js
11:34 Fix images URL
12:59 Second GitHub Actions job completed
13:45 Disable jekyll from running on GitHub Pages deployments with .nojekyll file
15:40 Third GitHub Actions job completed
15:52 Fix images url location with prefix
17:48 Fix favicon location
18:04 Setup environment variables
21:55 Change GitHub Actions command names
23:18 Conclusions and questions to you :)
----
Repository: https://github.com/bmvantunes/youtube...
----
Deployed App: https://bmvantunes.github.io/youtube-...
----
YouTube Video building the microphone store: • Next.js Tutorial - Part 8 | Static Si...
----
npm ci: https://docs.npmjs.com/cli/ci.html
----
Link to GitHub actions: https://github.com/features/actions
----
GitHub Actions Deploy to GitHub Pages: https://github.com/marketplace/action...
----
GitHub Actions environment variables: https://docs.github.com/en/actions/co...
----
favicon "shortcut icon" screenshot url: https://en.wikipedia.org/wiki/Favicon
----
----
Follow me on:
Twitter: / bmvantunes
Dev.to: https://dev.to/bmvantunes
Website: https://brunoantunes.net
Github: https://github.com/bmvantunes
LinkedIn: / bmvantunes
Watch video (CI/CD): Deploy Next.js (SSG) to GitHub Pages using GitHub Actions online without registration, duration hours minute second in high quality. This video was added by user Bruno Antunes 28 August 2020, don't forget to share it with your friends and acquaintances, it has been viewed on our site 18,804 once and liked it 608 people.