Skip to content

Instantly share code, notes, and snippets.

@syuji-higa
Created November 23, 2019 17:32
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save syuji-higa/2d7ece221bb521fc202ae385c54d0325 to your computer and use it in GitHub Desktop.
Save syuji-higa/2d7ece221bb521fc202ae385c54d0325 to your computer and use it in GitHub Desktop.
GitHub Actions - Genelate Nuxt.js deploy for GitHub Pages
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.x'
- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci
- run: npm run generate
- name: Deploy
uses: peaceiris/actions-gh-pages@v2.5.0
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: ./dist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment