This Action will Build your Nuxt Project, Generate Static files and deploy it to Github Pages. It is based on xRealNeon/VuePagesAction
- Create the
vue.config.jsfile - Add this to your
vue.config.js(and rename "YourRepoName" to your repo name)
module.exports = {
publicPath: '/YourRepoName/'
}- Create a Github Actions Workflow file and add this to it (and replace "YourGithubName" and "YourRepoName" with the names)
name: Build Vue
on: [push]
jobs:
build_vue:
runs-on: ubuntu-latest
name: Build Vue
steps:
- uses: actions/checkout@v2
- id: Build-Vue
uses: ashkantaravati/NuxtToGithubPages@v1.0
with:
username: 'YourGithubName'
reponame: 'YourRepoName'
token: ${{ secrets.GITHUB_TOKEN }} # Leave this line unchanged- Go to Settings -> Scroll down to GitHub Pages -> Select
gh-pagesas branch and/as directory
| Name | Description | Default | Required |
|---|---|---|---|
| username | Your username | - | ✅ |
| reponame | Your repository name | - | ✅ |
| token | Please leave this line unchanged | - | ✅ |
| gitemail | Git commit email | CI@example.com | ❌ |
| gitname | Git commit name | CI | ❌ |
| gitmsg | Git commit message | deploy | ❌ |
| cname | Custom domain | - | ❌ |