tenorjs-v2/.gitea/workflows/deploy.yml

40 lines
919 B
YAML
Raw Normal View History

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 }}
2024-09-23 00:20:15 +00:00
branch: ${{ github.base_ref }}
2024-09-22 23:32:31 +00:00
jobs:
build:
runs-on: self-hosted
steps:
- name: Pull latest from Git
run: |
2024-09-23 00:19:29 +00:00
echo "$branch"
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:19:29 +00:00
git checkout "$branch"
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