From 10144e34ea263444a9a2c3ae16bf6598806f7448 Mon Sep 17 00:00:00 2001 From: Boof <97455552+hexahigh@users.noreply.github.com> Date: Fri, 28 Apr 2023 11:13:45 +0200 Subject: [PATCH] Create createTorrent.yml --- .github/workflows/createTorrent.yml | 35 +++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/createTorrent.yml diff --git a/.github/workflows/createTorrent.yml b/.github/workflows/createTorrent.yml new file mode 100644 index 0000000..200630a --- /dev/null +++ b/.github/workflows/createTorrent.yml @@ -0,0 +1,35 @@ +name: Create torrent + +on: + workflow_dispatch: + push: + branches: [ main ] + +jobs: + sitemap_job: + runs-on: ubuntu-latest + name: Create torrent + + steps: + - name: Checkout the repo + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Install npm and the required packages + run: | + sudo apt update + sudo apt install nodejs + sudo apt install npm + npm install create-torrent + + - name: Create the torrent + run: | + wget https://hexahigh.github.io/cdn/other/torrent-create.js + node torrent-create.js + + - name: Commit changes + uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: "Github Action: Automatic sitemap update." + branch: ${{ github.ref }}