Skip to content

StruggleYang/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

23 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 πŸŽ‰

  • For Vue 2 : Create the vue.config.js file
  • For Vue 3 : 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.
  • For Vue 2 : Add this to your vue.config.js (and rename "YourRepoName" to your repo name)
module.exports = {
    publicPath: '/YourRepoName/'
}
  • For Vue 3 : 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/'
});

If project has CNAME file, steps 1 and 2 ignore

  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:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Vue App to Github Pages
        uses: StruggleYang/[email protected]
        with:
          useyarn: true # if project is npm build ,set false
  1. Go to Settings -> Scroll down to Pages -> Select Source as GitHub Actions

Options πŸ”§

Name Description Default Required
cname Custom domain - ❌
useyarn Use yarn to build true ❌

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published