fix(core): check if event is cancelable before preventing default (#81) #68
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
name: release & pages | |
on: | |
push: | |
branches: [master] | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: work around permission issue | |
run: git config --global --add safe.directory /github/workspace | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: "12.x" | |
- name: install dependencies | |
run: | | |
npm ci | |
npm run build | |
- name: generate docs | |
run: | | |
cd docs/ | |
npm install | |
npm run build | |
- name: init new repo in dist folder and commit generated files | |
run: | | |
cd docs/src/.vuepress/dist | |
git init | |
git add -A | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
echo "RELEASE_TARGET_BRANCH: $RELEASE_TARGET_BRANCH" | |
git commit -m 'deploy' | |
env: | |
RELEASE_TARGET_BRANCH: ${{ github.event.release.tag_name }} | |
- name: force push to destination branch | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: gh-pages | |
force: true | |
directory: ./docs/src/.vuepress/dist |