Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kentaro-m/portfolio-gatsby
:sunglasses: kentarom's portfolio site
https://github.com/kentaro-m/portfolio-gatsby
gatsbyjs my-portfolio
Last synced: 2 months ago
JSON representation
:sunglasses: kentarom's portfolio site
- Host: GitHub
- URL: https://github.com/kentaro-m/portfolio-gatsby
- Owner: kentaro-m
- License: mit
- Created: 2019-09-22T13:33:04.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-10T15:06:53.000Z (about 2 years ago)
- Last Synced: 2024-10-10T21:19:06.558Z (3 months ago)
- Topics: gatsbyjs, my-portfolio
- Language: SCSS
- Homepage: https://kentarom.com/
- Size: 4.43 MB
- Stars: 9
- Watchers: 2
- Forks: 3
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# portfolio-gatsby
## :arrow_forward: Usage
### Create a new site
```
$ npm install -g gatsby-cli
$ gatsby new portfolio-gatsby https://github.com/kentaro-m/portfolio-gatsby
```### Develop the site locally
```bash
$ npm install
$ npm run develop
```Open at `http://localhost:8000` in the browser.
## :rocket: Deploy
### Deploy to GitHub Pages using GitHub Actions
Add the `pathPrefix` to `gatsby-config.js`.
```js
module.exports = {
pathPrefix: `/repo-name`,
}
```Update the build script to `package.json`.
```diff
-"build": "gatsby build",
+"build": "gatsby build --prefix-paths",
```Add secrets to repository settings.
- **GITHUB_API_TOKEN**
- Use for fetch repository data from GitHub.
- Scope: `public_repo`
- **QIITA_API_TOKEN**
- Use for fetch article data from Qiita.
- Scope: `read_qiita`
- **RSS2JSON_API_TOKEN**
- Use for fetch slide data from Speaker Deck.
- **GH_TOKEN**
- Use for deploy to GitHub Pages
- Scope: `repo`Create the workflow file like `deploy.yml` and add it to `.github/workflows`.
```yml
name: Deployon:
push:
branches:
- masterjobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1- name: setup node 10.x
uses: actions/setup-node@v1
with:
node-version: '10.x'- name: install
run: npm install- name: build
run: npm run build
env:
GITHUB_API_TOKEN: ${{ secrets.GITHUB_API_TOKEN }}
QIITA_API_TOKEN: ${{ secrets.QIITA_API_TOKEN }}
RSS2JSON_API_TOKEN: ${{ secrets.RSS2JSON_API_TOKEN }}- name: deploy
uses: peaceiris/[email protected]
env:
PERSONAL_TOKEN: ${{ secrets.GH_TOKEN }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: ./public
```Push your changes to the master branch and start the build for deploy to GitHub Pages.
## :memo: Licence
MIT