mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2024-11-10 09:07:47 +01:00
41 lines
No EOL
1.1 KiB
YAML
41 lines
No EOL
1.1 KiB
YAML
name: create-sqlite-base
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
paths:
|
|
- databases/**
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
make-base-db:
|
|
name: Generate SQLite base .db
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 18
|
|
cache: npm
|
|
- run: npm ci
|
|
- name: Set config
|
|
run: |
|
|
echo '{"mode": "init-db-and-exit"}' > config.json
|
|
- name: Run Server
|
|
timeout-minutes: 10
|
|
run: npm start
|
|
- uses: actions/upload-artifact@v3
|
|
with:
|
|
name: SponsorTimesDB.db
|
|
path: databases/sponsorTimes.db
|
|
- uses: mchangrh/s3cmd-sync@f4f36b9705bdd9af7ac91964136989ac17e3b513
|
|
with:
|
|
args: --acl-public
|
|
env:
|
|
S3_ENDPOINT: ${{ secrets.S3_ENDPOINT }}
|
|
S3_BUCKET: ${{ secrets.S3_BUCKET }}
|
|
S3_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY_ID }}
|
|
S3_ACCESS_KEY_SECRET: ${{ secrets.S3_ACCESS_KEY_SECRET }}
|
|
SOURCE_DIR: 'databases/sponsorTimes.db' |