mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-08-10 12:01:57 +08:00
Feature/add doc builder (#804)
* Add support to x vversion from npm * Add support to x vversion from npm * Add support to x vversion from npm * Add docs builder
This commit is contained in:
parent
7dbc6d1e47
commit
6a5d4fe299
@ -6,11 +6,10 @@ name: Build Project
|
|||||||
|
|
||||||
# Controls when the action will run.
|
# Controls when the action will run.
|
||||||
on:
|
on:
|
||||||
# Triggers the workflow on push or pull request events but only for the master branch
|
|
||||||
push:
|
push:
|
||||||
branches: [ master, develop ]
|
branches: [ master, develop ]
|
||||||
pull_request:
|
release:
|
||||||
branches: [ master, develop ]
|
types: [created]
|
||||||
|
|
||||||
# Allows you to run this workflow manually from the Actions tab
|
# Allows you to run this workflow manually from the Actions tab
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
@ -34,4 +33,20 @@ jobs:
|
|||||||
- run: |
|
- run: |
|
||||||
cd docs
|
cd docs
|
||||||
npm i
|
npm i
|
||||||
npm run build
|
npm run build
|
||||||
|
- run: |
|
||||||
|
cd docs
|
||||||
|
git clone https://github.com/adempiere/adempiere-vue.git --branch gh-pages --single-branch gh-pages
|
||||||
|
cp -r .vuepress/dist/* gh-pages/
|
||||||
|
cd gh-pages
|
||||||
|
touch .nojekyll
|
||||||
|
git init
|
||||||
|
git config --local user.email "action@github.com"
|
||||||
|
git config --local user.name "GitHub Action"
|
||||||
|
git add .
|
||||||
|
git commit -m "Update documentation" -a || true
|
||||||
|
- uses: ad-m/github-push-action@master
|
||||||
|
with:
|
||||||
|
branch: gh-pages
|
||||||
|
directory: docs/gh-pages
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
21
.github/workflows/publish.yml
vendored
21
.github/workflows/publish.yml
vendored
@ -38,27 +38,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: 12
|
node-version: 12
|
||||||
registry-url: https://registry.npmjs.org/
|
registry-url: https://registry.npmjs.org/
|
||||||
- run: set -e
|
|
||||||
- run: |
|
|
||||||
cd docs
|
|
||||||
npm i
|
|
||||||
npm run build
|
|
||||||
- run: |
|
|
||||||
cd docs
|
|
||||||
git clone https://github.com/adempiere/adempiere-vue.git --branch gh-pages --single-branch gh-pages
|
|
||||||
cp -r .vuepress/dist/* gh-pages/
|
|
||||||
cd gh-pages
|
|
||||||
touch .nojekyll
|
|
||||||
git init
|
|
||||||
git config --local user.email "action@github.com"
|
|
||||||
git config --local user.name "GitHub Action"
|
|
||||||
git add .
|
|
||||||
git commit -m "Update documentation" -a || true
|
|
||||||
- uses: ad-m/github-push-action@master
|
|
||||||
with:
|
|
||||||
branch: gh-pages
|
|
||||||
directory: docs/gh-pages
|
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
- run: npm i
|
- run: npm i
|
||||||
- run: sed -i "s|releaseNoForDocumentation|${{ github.event.release.tag_name }}|g" config/default.json
|
- run: sed -i "s|releaseNoForDocumentation|${{ github.event.release.tag_name }}|g" config/default.json
|
||||||
- run: npm run build:prod --if-present
|
- run: npm run build:prod --if-present
|
||||||
|
Loading…
x
Reference in New Issue
Block a user