Skip to content

Commit

Permalink
chore: use github action automation build
Browse files Browse the repository at this point in the history
  • Loading branch information
wangding committed Jun 26, 2023
1 parent 8857ace commit 61c0086
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
39 changes: 39 additions & 0 deletions .github/workflows/npm-grunt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: build and publish

on:
push:
branches: [ "master" ]

jobs:
build:
runs-on: ubuntu-latest
env:
QINIU_AK: ${{ secrets.QINIU_AK }}
QINIU_SK: ${{ secrets.QINIU_SK }}

strategy:
matrix:
node-version: [10.5]

steps:
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: install dependencies
run: npm install

- name: install gitbook plugins
run: npx gitbook install

- name: build gitbook
run: npx gitbook build

- name: minify code
run: npx grunt minify

- name: upload website
run: npx grunt upload
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"homepage": "https://github.com/wangding/info-theory-lab-manual#readme",
"devDependencies": {
"gitbook-cli": "^2.3.2",
"grunt": "^1.0.1",
"grunt": "1.0.1",
"grunt-contrib-copy": "^1.0.0",
"grunt-contrib-cssmin": "^3.0.0",
"grunt-contrib-htmlmin": "^2.4.0",
Expand Down

0 comments on commit 61c0086

Please sign in to comment.