Skip to content

[Types] Switch to one path alias #16

[Types] Switch to one path alias

[Types] Switch to one path alias #16

Workflow file for this run

name: Build and push
on:
push:
branches: [master]
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
cache: pnpm
- name: Install dependencies
run: pnpm i
- name: Build
run: pnpm run build
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: dist
path: dist/*
push:
name: Push to branch
runs-on: ubuntu-latest
needs: build
permissions:
contents: write
steps:
- uses: actions/checkout@v3
with:
ref: builds
- name: Cleanup
run: git rm -r . || git rm -r * || true
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: dist
path: "."
- name: Commit files
run: |
git config --local user.email "actions@github.com"
git config --local user.name "GitHub Actions"
git add .
git commit -m "Build $GITHUB_SHA" || exit 0
git push