diff --git a/README.md b/README.md index 70ebd06..768b2c9 100644 --- a/README.md +++ b/README.md @@ -38,3 +38,4 @@ jobs: | gitname | Git commit name | CI | ❌ | | gitmsg | Git commit message | deploy | ❌ | | cname | Custom domain | - | ❌ | +| useyarn | Use yarn to build | false | ❌ | diff --git a/action.yml b/action.yml index d8bc2d9..b07c2ad 100644 --- a/action.yml +++ b/action.yml @@ -29,13 +29,17 @@ inputs: description: 'Your custom domain' required: false default: 'none' + useyarn: + description: 'Use yarn to build' + required: false + default: false runs: using: "composite" steps: - name: Build Vue run: | - npm ci - npm run build + if [ true == ${{ inputs.useyarn }} ]; then yarn install --frozen-lockfile; else npm ci; fi + if [ true == ${{ inputs.useyarn }} ]; then yarn build; else npm run build; fi cd dist ln -s index.html 404.html if [ "none" != ${{ inputs.cname }} ]; then echo '${{ inputs.cname }}' > CNAME; fi