adios setup and components, maybe another day #56
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: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: checkout source | |
uses: actions/checkout@v3 | |
- name: setup nodejs | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- uses: pnpm/[email protected] | |
name: install pnpm | |
id: pnpm-install | |
with: | |
version: 7 | |
run_install: false | |
- name: get pnpm store directory | |
id: pnpm-cache | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v3 | |
name: setup pnpm cache | |
with: | |
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: install deps | |
run: pnpm i | |
- name: run build | |
run: pnpm run build | |
# - name: run export | |
# run: pnpm run export | |
- name: run redirs | |
run: pnpm run redirs | |
- name: deploy website | |
if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
env: | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
uses: careflow/netlify-actions/cli@master | |
with: | |
args: deploy --prod --dir dist/ |