Update all dependencies #59
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: | |
branches: | |
- master | |
- main | |
pull_request: | |
branches: | |
- master | |
- main | |
jobs: | |
build: | |
name: Build Blackprint Modules | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 # Usually this will be finish under 5 minutes | |
steps: | |
- uses: actions/checkout@v4 | |
- name: ⚙ Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 16 | |
registry-url: https://registry.npmjs.org/ | |
- name: 🔃 Setup PNPM modules | |
uses: actions/cache@v4 | |
with: | |
path: ~/.pnpm-store | |
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}- | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 6.0.2 | |
run_install: true | |
- name: 🛠 Compiling Blackprint Modules | |
run: npx blackprint build production | |
- name: 🔥 Run Tests | |
# env: | |
# YOUR_ENV_A: ${{ secrets.YOUR_ENV_A }} | |
# YOUR_ENV_B: ${{ secrets.YOUR_ENV_B }} | |
run: npm test | |
- name: 🚀 Deploy | |
uses: JamesIves/github-pages-deploy-action@v4 | |
if: github.event_name != 'pull_request' # Don't deploy, it will be dangerous if someone submit dangerous pull request | |
with: | |
branch: dist # The branch the action should deploy to. | |
folder: dist # The folder the action should deploy. | |
single-commit: true |