diff --git a/.github/workflows/deploy-docs-to-gh-pages.yml b/.github/workflows/deploy-docs-to-gh-pages.yml new file mode 100644 index 0000000000..bbc39dde70 --- /dev/null +++ b/.github/workflows/deploy-docs-to-gh-pages.yml @@ -0,0 +1,34 @@ +name: Deploy documentation to GitHub pages +on: + push: + branches: [ master ] +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Generate static vuepress files + uses: actions/setup-node@v1 + with: + node-version: '12.x' + - run: npm ci + - run: npm run docs:build + + - name: Init new repo in dist folder and commit generated files + run: | + cd docs/.vuepress/dist + git init + git add -A + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git commit -m 'deploy' + + - name: Force push to gh-pages branch + uses: ad-m/github-push-action@v0.5.0 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: gh-pages + force: true + directory: ./docs/.vuepress/dist