# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created # For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages # This file was contributed by Carlos Parada and Yamel Senih from ERP Consultores y Asociados, C.A name: Deploy on Github Pages # Controls when the action will run. on: push: branches: # Push events on master and develop branchs - master - develop # takes only the directory changes paths: - 'docs/**' # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: # This workflow contains a single job called "build" build: name: Build and deploy ADempiere-Vue docs # The type of runner that the job will run on runs-on: ubuntu-latest strategy: matrix: node-version: [14.x] # Steps represent a sequence of tasks that will be executed as part of the job steps: - name: Check out the repo uses: actions/checkout@v2 - name: Node configuration uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} - name: Generate static vuepress files run: | cd docs npm i npm run build - name: Init new repo in dist folder and commit generated files run: | cd docs/.vuepress/dist touch .nojekyll git init git config --local user.email "action@github.com" git config --local user.name "GitHub Action" git add -A git commit -m "docs: ${{ github.event.head_commit.message }}" -a || true - name: Force push to destination branch uses: ad-m/github-push-action@v0.6.0 with: branch: gh-pages force: true directory: docs/.vuepress/dist github_token: ${{ secrets.GITHUB_TOKEN }}