Skip to content

btrbaka/VuePagesAction

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace
Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

21 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Build Vue and deploy it to Github Pages πŸš€

This Action will Build your Vue Project and deploy it to Github Pages

Getting Started πŸŽ‰

  1. You should have a vite.config.js or a vite.config.ts file at the root of your directory. Create one if you don't.

  2. Add this to you vite.config.js or vite.config.ts (and rename "YourRepoName" to your repo name)

export default defineConfig({
  ... // Already existing configurations
  base: '/YourRepoName/'
});
  1. 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@v3
    - id: Build-Vue
      uses: nvkomata/VuePagesAction@1.1
      with:
        username: 'YourGithubName'
        reponame: 'YourRepoName'
        token: ${{ secrets.GITHUB_TOKEN }} # Leave this line unchanged
  1. Go to Settings -> Scroll down to GitHub Pages -> Select gh-pages as branch and / as directory

Options πŸ”§

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 - ❌
usepnpm Use pnpm to build true ❌

About

builds vue using pnpm and deploys to gh pages

Resources

License

Stars

Watchers

Forks