Skip to content

Commit 73ec48f

Browse files
add deploy-password.yml example for password-protected deploys
1 parent 3c09e1a commit 73ec48f

2 files changed

Lines changed: 37 additions & 0 deletions

File tree

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Deploy
2+
on:
3+
push:
4+
branches: [main]
5+
6+
jobs:
7+
deploy:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- run: npm ci && npm run build
12+
- uses: shipstatic/action@v1
13+
with:
14+
path: ./dist
15+
password: ${{ secrets.SHIP_PASSWORD }}

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,28 @@ jobs:
107107
github-token: ${{ secrets.GITHUB_TOKEN }}
108108
```
109109

110+
## [`deploy-password.yml`](.github/workflows/deploy-password.yml) — Password-Protected Deploy
111+
112+
Push to `main` deploys with an unlock prompt — visitors enter the password before viewing. Works on any tier (no API key required). Set a `SHIP_PASSWORD` secret (6–128 characters; whitespace significant) and share it out-of-band with the people who should see the site.
113+
114+
```yaml
115+
name: Deploy
116+
on:
117+
push:
118+
branches: [main]
119+
120+
jobs:
121+
deploy:
122+
runs-on: ubuntu-latest
123+
steps:
124+
- uses: actions/checkout@v4
125+
- run: npm ci && npm run build
126+
- uses: shipstatic/action@v1
127+
with:
128+
path: ./dist
129+
password: ${{ secrets.SHIP_PASSWORD }}
130+
```
131+
110132
---
111133

112134
See the [action documentation](https://github.com/shipstatic/action) for all inputs, outputs, and options.

0 commit comments

Comments
 (0)