-
Notifications
You must be signed in to change notification settings - Fork 16
33 lines (33 loc) · 920 Bytes
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Build
on:
push:
branches:
- master
tags-ignore:
- '**'
jobs:
Vitepress_build:
runs-on: ubuntu-latest
name: Vitepress build
steps:
- uses: actions/checkout@v2
- uses: Klemensas/action-autotag@stable
with:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
tag_prefix: "v"
- name: Setup and build
shell: bash
run: |
npm install
npm run build
cd .vitepress/dist
touch .nojekyll
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git init
git add -A
git commit -m autobuild
git push -f https://$GITHUB_ACTOR:${{secrets.GITHUB_TOKEN}}@github.com/$GITHUB_REPOSITORY.git master:gh-pages
- uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}