From 6a5d4fe299d7489f8e8ded5095b1ab6837a12266 Mon Sep 17 00:00:00 2001 From: Yamel Senih Date: Mon, 3 May 2021 16:17:04 -0400 Subject: [PATCH] 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 --- .../workflows/{documentation.yml => docs.yml} | 23 +++++++++++++++---- .github/workflows/publish.yml | 21 ----------------- 2 files changed, 19 insertions(+), 25 deletions(-) rename .github/workflows/{documentation.yml => docs.yml} (61%) diff --git a/.github/workflows/documentation.yml b/.github/workflows/docs.yml similarity index 61% rename from .github/workflows/documentation.yml rename to .github/workflows/docs.yml index 432c4c32..afd06e8c 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/docs.yml @@ -6,11 +6,10 @@ name: Build Project # Controls when the action will run. on: - # Triggers the workflow on push or pull request events but only for the master branch push: branches: [ master, develop ] - pull_request: - branches: [ master, develop ] + release: + types: [created] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -34,4 +33,20 @@ jobs: - run: | cd docs npm i - npm run build \ No newline at end of file + 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 }} \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ef34b4a0..e9523907 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -38,27 +38,6 @@ jobs: with: node-version: 12 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: sed -i "s|releaseNoForDocumentation|${{ github.event.release.tag_name }}|g" config/default.json - run: npm run build:prod --if-present