From 0c47dca037c66b981a9bba4774b6c984b8cadf3a Mon Sep 17 00:00:00 2001 From: Jonny Burger Date: Mon, 14 Oct 2024 15:34:41 +0200 Subject: [PATCH] Update template --- .github/workflows/render-video.yml | 51 ++++++++++++++++++++++++++++++ package.json | 2 +- tsconfig.json | 4 +-- 3 files changed, 54 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/render-video.yml diff --git a/.github/workflows/render-video.yml b/.github/workflows/render-video.yml new file mode 100644 index 0000000..ed34fb5 --- /dev/null +++ b/.github/workflows/render-video.yml @@ -0,0 +1,51 @@ +on: + workflow_dispatch: + inputs: + repoOrg: + description: "Repo Org" + required: true + default: "pomber" + repoName: + description: "Repo Name" + required: true + default: "didact" + starCount: + description: "Star Count" + required: true + default: "100" + duration: + description: "Duration (seconds)" + required: false + default: "15" +name: Render video +jobs: + render: + name: Render video + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@main + - name: Setup node + uses: actions/setup-node@v3 + with: + node-version: 16 + - name: Install Fallback fonts (fonts) + run: | + sudo apt-get update -yqq + sudo apt-get install -yq --no-install-recommends \ + fonts-noto-core fonts-noto-cjk fonts-noto-color-emoji fonts-noto-mono + - name: Install dependencies (node modules) + run: npm i + - name: Define input props + run: echo $WORKFLOW_INPUT | tee input-props.json | jq -C '.' # Inject to file, inspect to logs + env: + WORKFLOW_INPUT: ${{ toJson(github.event.inputs) }} + - name: Render video + run: npm run build -- --props="./input-props.json" + env: + REMOTION_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Upload video + uses: actions/upload-artifact@v3 + with: + name: out.mp4 + path: out/Main.mp4 diff --git a/package.json b/package.json index 80b74f6..4822d68 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "@types/react": "18.3.1", "eslint": "8.56.0", "prettier": "3.3.3", - "typescript": "5.6.2" + "typescript": "5.5.4" }, "private": true } diff --git a/tsconfig.json b/tsconfig.json index e7291f0..d432073 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,7 +3,6 @@ "target": "ES2018", "module": "commonjs", "jsx": "react-jsx", - "outDir": "./dist", "strict": true, "noEmit": true, "lib": ["es2015", "DOM"], @@ -11,7 +10,8 @@ "skipLibCheck": true, "forceConsistentCasingInFileNames": true, "strictNullChecks": true, - "noUnusedLocals": true + "noUnusedLocals": true, + "incremental": true }, "exclude": ["remotion.config.ts"] }