Skip to content

Commit

Permalink
add github action
Browse files Browse the repository at this point in the history
  • Loading branch information
吴浩麟 committed Jul 11, 2020
1 parent e9570a3 commit a0846b0
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/pub.yml
@@ -0,0 +1,33 @@
name: Build & Pub

on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
- name: Build
run: |
npm run init
npm run build
- name: Commit files
run: |
cd _book
git config --global user.email "action@github.com"
git config --global user.name "GitHub Action"
git init
git add .
git commit -m "GitHub Action build docs" -a
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
directory: docs

0 comments on commit a0846b0

Please sign in to comment.