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 }}