diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 0000000..d0c683d --- /dev/null +++ b/.github/workflows/pages.yml @@ -0,0 +1,52 @@ +name: Deploy install scripts to Pages + +on: + push: + branches: [main] + paths: + - install.sh + - install.ps1 + - CNAME + - .nojekyll + - .github/workflows/pages.yml + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: pages + cancel-in-progress: false + +jobs: + deploy: + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - uses: actions/checkout@v4 + - uses: actions/configure-pages@v5 + - name: Stage install scripts + run: | + mkdir -p _site + cp install.sh install.ps1 _site/ + [ -f CNAME ] && cp CNAME _site/ + touch _site/.nojekyll + # Also index page (humans landing) + cat > _site/index.html <<'HTML' + + unarr installer +

unarr CLI installer

+
Linux/macOS:  curl -fsSL https://unarr.torrentclaw.com/install.sh | sh
+          Windows:      irm https://unarr.torrentclaw.com/install.ps1 | iex
+

Source: github.com/torrentclaw/unarr

+ + HTML + - uses: actions/upload-pages-artifact@v3 + with: + path: _site + - id: deployment + uses: actions/deploy-pages@v4