diff --git a/.github/workflows/generate-trophy.yml b/.github/workflows/generate-trophy.yml new file mode 100644 index 00000000..8dcbe7a8 --- /dev/null +++ b/.github/workflows/generate-trophy.yml @@ -0,0 +1,42 @@ +name: Generate Trophy + +on: + schedule: + - cron: "0 0 * * *" + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup Deno + uses: denoland/setup-deno@v2 + with: + deno-version: v1.x + + - name: Make dist folder + run: mkdir -p dist + + - name: Generate Trophy SVG + run: | + deno run \ + --allow-net \ + --allow-env \ + --allow-read \ + --allow-write \ + ./render_svg.ts \ + Sathya-Ganesh007 \ + ./dist \ + onedark + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Push to output branch + uses: crazy-max/ghaction-github-pages@v4 + with: + target_branch: trophy-output + build_dir: dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}