Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jhasuraj01/github-cron
This is the Demonstration for how easily we can use Next.js and GitHub Actions to Create Sites with Dynamic content and schedule CRON Job for auto build at specific time/interval of time.
https://github.com/jhasuraj01/github-cron
actions cron cronjob scheduler
Last synced: 1 day ago
JSON representation
This is the Demonstration for how easily we can use Next.js and GitHub Actions to Create Sites with Dynamic content and schedule CRON Job for auto build at specific time/interval of time.
- Host: GitHub
- URL: https://github.com/jhasuraj01/github-cron
- Owner: jhasuraj01
- Created: 2021-09-28T17:05:26.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-04-23T00:40:29.000Z (10 months ago)
- Last Synced: 2024-04-23T05:29:43.411Z (10 months ago)
- Topics: actions, cron, cronjob, scheduler
- Language: JavaScript
- Homepage: https://jhasuraj.com/github-cron/
- Size: 2.45 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GitHub Actions Auto Build and Deploy Next.js APP with CRON JOB
We Have two different nextjs config for dev and github pages
## Next Config for Dev EnvironmentUpdate the next.config.js as given below for development environment
```javascript
// next.config.jsmodule.exports = {
reactStrictMode: true,
// basePath: '/github-cron',
}
```## Run the local server
```bash
npm run dev
```
Open [http://localhost:8080](http://localhost:8080) with your browser to see the result.## Next Config for Github Pages
Update the next.config.js accordingly before deploy to github.
```javascript
// next.config.js
module.exports = {
reactStrictMode: true,
// only needed when you are not hosting this project from root directory
basePath: '/github-cron',
}
```## Static Build
```bash
npm run export
```
This will generate all the static files in ```/docs``` folder. You can directly push all the changes including ```/docs``` folder to GitHub and you GitHub site will be automatically updated.> Remember to update your GitHub Pages Build Directory to ```/docs``` in GitHub Settings.