Merge pull request #61 from dipu-bd/dependabot/npm_and_yarn/examples/… #90
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will publish dist to gh-pages on every push to master branch | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages | |
name: Build | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
gh-pages: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 14 | |
- name: Build and Lint | |
run: | | |
npm ci | |
npm run lint | |
- name: Recreating gh-pages | |
run: | | |
cd examples/vue | |
npm ci | |
npm run build | |
cd dist | |
cp -r ../../../.git . | |
git config --local user.email "[email protected]" | |
git config --local user.name "dipu-bd" | |
git branch -D gh-pages || true | |
git checkout -b gh-pages | |
git add --all | |
git commit -m "[GHA] Update gh-pages" | |
- name: Publish changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: gh-pages | |
force: true | |
directory: examples/vue/dist |