2024-09-22 23:32:31 +00:00
|
|
|
name: TenorJS-v2 Deploy Automation
|
|
|
|
|
|
|
|
on:
|
2024-09-23 00:10:07 +00:00
|
|
|
pull_request:
|
2024-09-22 23:32:31 +00:00
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
|
|
|
|
env:
|
|
|
|
DHUB_UNAME: ${{ secrets.DHUB_UNAME }}
|
|
|
|
DHUB_PWORD: ${{ secrets.DHUB_PWORD }}
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: self-hosted
|
|
|
|
steps:
|
|
|
|
- name: Pull latest from Git
|
|
|
|
run: |
|
2024-09-23 00:15:16 +00:00
|
|
|
echo "${{ gitea.action_name }}"
|
2024-09-22 23:32:31 +00:00
|
|
|
pwd
|
|
|
|
whoami
|
|
|
|
mkdir -p /var/lib/act_runner/
|
|
|
|
cd /var/lib/act_runner/
|
|
|
|
if [ ! -d "tenorjs-v2" ]; then
|
|
|
|
git clone https://git.vfsh.dev/voidf1sh/tenorjs-v2
|
|
|
|
cd tenorjs-v2
|
|
|
|
else
|
|
|
|
cd tenorjs-v2
|
|
|
|
git pull
|
|
|
|
fi
|
2024-09-23 00:15:16 +00:00
|
|
|
git checkout "${{ gitea.action_name }}"
|
2024-09-22 23:53:45 +00:00
|
|
|
- name: Run tests
|
|
|
|
run: |
|
|
|
|
cd /var/lib/act_runner/tenorjs-v2
|
|
|
|
npm install
|
|
|
|
npm run test
|
2024-09-22 23:32:31 +00:00
|
|
|
- name: Publish to NPM
|
|
|
|
run: |
|
|
|
|
cd /var/lib/act_runner/tenorjs-v2
|
|
|
|
npm publish
|