🚧 refactor file structure #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: push | |
jobs: | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: 🛎️ Checkout GitHub | |
uses: actions/checkout@master | |
- name: 🔨 Install dependencies | |
run: | | |
yarn | |
cd demo | |
yarn | |
- name: 🔧 Build demo | |
run: | | |
yarn docs | |
- name: 🚀 Deploy to GitHub Pages | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages | |
folder: 'demo/dist' | |
release: | |
if: startsWith(github.ref, 'refs/tags/') | |
runs-on: ubuntu-latest | |
steps: | |
- name: 🛎️ Checkout GitHub | |
uses: actions/checkout@master | |
- name: 🔨 Install and Build | |
run: | | |
yarn | |
yarn build | |
- name: 🔧 Setup Node | |
uses: actions/setup-node@v2 | |
with: | |
registry-url: 'https://registry.npmjs.org' | |
- name: 📚 Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: '/dist' | |
- name: 📦 Publish to NPM | |
run: yarn publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |