docs: Add example for Next project (React)
This commit is contained in:
parent
6f22f8bab3
commit
dea149a296
56
README.md
56
README.md
|
@ -30,6 +30,7 @@ Table of Contents
|
||||||
- [Examples](#examples)
|
- [Examples](#examples)
|
||||||
- [Static Site Generators with Node.js](#static-site-generators-with-nodejs)
|
- [Static Site Generators with Node.js](#static-site-generators-with-nodejs)
|
||||||
- [Gatsby](#gatsby)
|
- [Gatsby](#gatsby)
|
||||||
|
- [React and Next](#react-and-next)
|
||||||
- [Vue and Nuxt](#vue-and-nuxt)
|
- [Vue and Nuxt](#vue-and-nuxt)
|
||||||
- [Static Site Generators with Python](#static-site-generators-with-python)
|
- [Static Site Generators with Python](#static-site-generators-with-python)
|
||||||
- [License](#license)
|
- [License](#license)
|
||||||
|
@ -161,9 +162,8 @@ By pulling docker images, you can reduce the overall execution time of your work
|
||||||
|
|
||||||
### Static Site Generators with Node.js
|
### Static Site Generators with Node.js
|
||||||
|
|
||||||
[Next.js], [hexo], [gitbook], [vuepress], [react-static], [gridsome], etc.
|
[hexo], [gitbook], [vuepress], [react-static], [gridsome], etc.
|
||||||
|
|
||||||
[Next.js]: https://github.com/zeit/next.js
|
|
||||||
[hexo]: https://github.com/hexojs/hexo
|
[hexo]: https://github.com/hexojs/hexo
|
||||||
[gitbook]: https://github.com/GitbookIO/gitbook
|
[gitbook]: https://github.com/GitbookIO/gitbook
|
||||||
[vuepress]: https://github.com/vuejs/vuepress
|
[vuepress]: https://github.com/vuejs/vuepress
|
||||||
|
@ -211,6 +211,8 @@ An example for [Gatsby] (Gatsby.js) project with [gatsby-starter-blog]
|
||||||
[Gatsby]: https://github.com/gatsbyjs/gatsby
|
[Gatsby]: https://github.com/gatsbyjs/gatsby
|
||||||
[gatsby-starter-blog]: https://github.com/gatsbyjs/gatsby-starter-blog
|
[gatsby-starter-blog]: https://github.com/gatsbyjs/gatsby-starter-blog
|
||||||
|
|
||||||
|
![peaceiris/actions-gh-pages latest version](https://img.shields.io/github/release/peaceiris/actions-gh-pages.svg?label=peaceiris%2Factions-gh-pages)
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
name: github pages
|
name: github pages
|
||||||
|
|
||||||
|
@ -250,6 +252,56 @@ jobs:
|
||||||
PUBLISH_DIR: ./public
|
PUBLISH_DIR: ./public
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### React and Next
|
||||||
|
|
||||||
|
An example for [Next.js] (React.js) project with [create-next-app]
|
||||||
|
|
||||||
|
- cf. [Deploying a Next.js app into GitHub Pages · zeit/next.js Wiki](https://github.com/zeit/next.js/wiki/Deploying-a-Next.js-app-into-GitHub-Pages)
|
||||||
|
|
||||||
|
[Next.js]: https://github.com/zeit/next.js
|
||||||
|
[create-next-app]: https://nextjs.org/docs
|
||||||
|
|
||||||
|
![peaceiris/actions-gh-pages latest version](https://img.shields.io/github/release/peaceiris/actions-gh-pages.svg?label=peaceiris%2Factions-gh-pages)
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
name: github pages
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-deploy:
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@master
|
||||||
|
|
||||||
|
- name: setup node
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: '10.16'
|
||||||
|
|
||||||
|
- name: install
|
||||||
|
run: yarn install
|
||||||
|
|
||||||
|
- name: build
|
||||||
|
run: yarn build
|
||||||
|
|
||||||
|
- name: export
|
||||||
|
run: yarn export
|
||||||
|
|
||||||
|
- name: add nojekyll
|
||||||
|
run: touch ./out/.nojekyll
|
||||||
|
|
||||||
|
- name: deploy
|
||||||
|
uses: peaceiris/actions-gh-pages@v2.2.0
|
||||||
|
env:
|
||||||
|
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
|
||||||
|
PUBLISH_BRANCH: gh-pages
|
||||||
|
PUBLISH_DIR: ./out
|
||||||
|
```
|
||||||
|
|
||||||
### Vue and Nuxt
|
### Vue and Nuxt
|
||||||
|
|
||||||
An example for [Nuxt.js] (Vue.js) project with [create-nuxt-app]
|
An example for [Nuxt.js] (Vue.js) project with [create-nuxt-app]
|
||||||
|
|
Loading…
Reference in New Issue