Merge pull request #35 from beanio/dependabot/npm_and_yarn/micromatch… #78
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: | |
pull_request: | |
branches: [ main ] | |
push: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Git repo | |
uses: actions/checkout@v2 | |
- name: Setup node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '18' | |
- name: Restore node_modules | |
uses: actions/cache@v2 | |
with: | |
path: '**/node_modules' | |
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }} | |
- name: Build with npm | |
run: | | |
npm install | |
npm run build | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
if: github.event_name == 'push' | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./build |