Refactor code for cleaner look and efficiency #3
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, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
if: > | |
github.event_name == 'push' || | |
github.event.pull_request.head.repo.full_name != github.repository | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Use Deno | |
uses: denoland/setup-deno@v1 | |
with: | |
deno-version: v1.x | |
- name: Format Check | |
run: deno fmt --check | |
- name: Lint | |
run: deno lint | |
- name: Test | |
run: deno test | |
- name: Build | |
run: deno task build | |
- if: github.ref == 'refs/heads/main' && env.CLASPRC != '' | |
name: Deploy | |
run: echo "$CLASPRC" > ~/.clasprc.json && deno task build deploy | |
env: | |
CLASPRC: ${{ secrets.CLASPRC }} |