ci: deploy install scripts to GitHub Pages
This commit is contained in:
parent
01b40ca244
commit
4a77756533
1 changed files with 52 additions and 0 deletions
52
.github/workflows/pages.yml
vendored
Normal file
52
.github/workflows/pages.yml
vendored
Normal file
|
|
@ -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'
|
||||
<!doctype html>
|
||||
<html><head><meta charset=utf-8><title>unarr installer</title></head>
|
||||
<body><h1>unarr CLI installer</h1>
|
||||
<pre>Linux/macOS: curl -fsSL https://unarr.torrentclaw.com/install.sh | sh
|
||||
Windows: irm https://unarr.torrentclaw.com/install.ps1 | iex</pre>
|
||||
<p>Source: <a href="https://github.com/torrentclaw/unarr">github.com/torrentclaw/unarr</a></p>
|
||||
</body></html>
|
||||
HTML
|
||||
- uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: _site
|
||||
- id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
Loading…
Add table
Add a link
Reference in a new issue