update: github actions config x3 #36
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 scripts | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: "yarn" | |
- name: Yarn build | |
run: | | |
yarn install | |
yarn run rebuild | |
mkdir npm && mv dist LICENSE README.md package.json npm && mv npm/dist/esm/index.browser.d.ts npm/dist/esm/translator.mod.d.ts | |
- name: Deploy | |
uses: s0/git-publish-subdir-action@develop | |
env: | |
REPO: [email protected]:BANKA2017/translator-utils.git | |
BRANCH: npm | |
FOLDER: npm | |
COMMIT_NAME: ${{ secrets.COMMIT_NAME }} | |
COMMIT_EMAIL: ${{ secrets.COMMIT_EMAIL }} | |
SQUASH_HISTORY: true | |
MESSAGE: "npm: {msg} ~ {sha}" | |
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} |