Files
VideoPlayer/.github/workflows/ready.yml
db123 1649b25f05
Some checks failed
Build and Deploy to CDN / build (push) Failing after 19s
ci: made workflow github compatible
2026-05-06 15:52:20 +03:30

48 lines
1.2 KiB
YAML

name: Build and Deploy to CDN
on:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run linter
run: npm run lint
- name: Run tests
run: npm test
- name: Build CDN assets
run: npm run build
- name: Build npm package
run: npm run build:raw
- name: Publish to Gitea npm registry
env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
run: |
echo "//${{ secrets.GITEA_HOST || 'git.db123.ir' }}/api/packages/${{ github.repository_owner }}/${{ github.event.repository.name }}/npm/:_authToken=${GITEA_TOKEN}" > .npmrc
npm publish --registry https://${{ secrets.GITEA_HOST || 'git.db123.ir' }}/api/packages/${{ github.repository_owner }}/${{ github.event.repository.name }}/npm
- name: Upload CDN build as artifact
uses: actions/upload-artifact@v4
with:
name: cdn-build
path: dist/
retention-days: 7