This Action will Build your Vue Project and deploy it to a specified branch
- If you are using GitHub pages (
gh-pages
branch), create thevue.config.js
file and add this to yourvue.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: LizAinslie/[email protected]
with:
username: 'YourGithubName'
reponame: 'YourRepoName'
token: ${{ secrets.GITHUB_TOKEN }} # Leave this line unchanged
branch: 'YourBranchName' # defaults to 'gh-pages' but can be changed
- If you want to use GitHub Pages, go to Settings -> Scroll down to GitHub Pages -> Select your branch name as 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 | [email protected] | โ |
gitname | Git commit name | CI | โ |
gitmsg | Git commit message | deploy | โ |
gitbranch | Custom branch | gh-pages | โ |
useyarn | Use yarn to build | false | โ |