Skip to content

Commit

Permalink
Moved build and publish process to GitHub actions. (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
fzankl authored Aug 20, 2022
1 parent 553d042 commit f4475ee
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 15 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Build plugin
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies and build 🔧
run: npm ci
21 changes: 21 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Build and Publish plugin
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies and build 🔧
run: npm ci
- name: Publish on NPM 📦
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
11 changes: 0 additions & 11 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# GitBook plugin: Flexible Alerts

![Build Status](https://api.travis-ci.org/zanfab/gitbook-plugin-flexible-alerts.svg)
![Build Status](https://github.com/fzankl/gitbook-plugin-flexible-alerts/actions/workflows/main/badge.svg)
[![npm version](https://img.shields.io/npm/v/gitbook-plugin-flexible-alerts/latest.svg)](https://www.npmjs.com/package/gitbook-plugin-flexible-alerts)
[![npm Downloads](https://img.shields.io/npm/dt/gitbook-plugin-flexible-alerts.svg)](https://www.npmjs.com/package/gitbook-plugin-flexible-alerts)

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const pluginCJS = merge({}, config, {
terser(pluginSettings.terser),
copy({
assets: [
'./src/book/style.css'
'./style.css'
]
})
]
Expand Down

0 comments on commit f4475ee

Please sign in to comment.