diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml new file mode 100644 index 0000000..ef023da --- /dev/null +++ b/.github/workflows/gh-pages.yml @@ -0,0 +1,23 @@ +name: Build and Deploy GitHub pages +on: + release: + types: + - created +jobs: + build-and-deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout 🛎️ + uses: actions/checkout@v2 + + - name: Install 🔧 + run: npm install + + - name: Build 🏗️ + run: npm run build-gh-pages + + - name: Deploy 🚀 + uses: JamesIves/github-pages-deploy-action@4.1.1 + with: + branch: gh-pages + folder: gh-pages diff --git a/package.json b/package.json index 36c7190..7514fe6 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "scripts": { "build": "rm -rf lib && babel src -d lib", "build-docs": "esdoc", + "build-gh-pages": "npm run build-docs", "cover": "c8 --all --src src --reporter=lcov npm test", "lint-config": "fixpack --dryRun", "lint-config-and-fix": "fixpack || fixpack",