Skip to content

Commit f2f1cd8

Browse files
committed
added github action
1 parent 55a0a28 commit f2f1cd8

3 files changed

Lines changed: 84 additions & 1 deletion

File tree

.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Copy to .env for local development
2+
VITE_FORM_HANDLE=https://wedding.shrek-labs.ru/api/wedding/answer

.github/workflows/deploy.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
pages: write
10+
id-token: write
11+
12+
concurrency:
13+
group: pages
14+
cancel-in-progress: true
15+
16+
jobs:
17+
deploy:
18+
runs-on: ubuntu-latest
19+
environment:
20+
name: github-pages
21+
url: ${{ steps.deployment.outputs.page_url }}
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- uses: actions/setup-node@v4
26+
with:
27+
node-version: "22"
28+
cache: npm
29+
30+
- run: npm install
31+
32+
- run: npm run build
33+
env:
34+
VITE_FORM_HANDLE: ${{ vars.VITE_FORM_HANDLE }}
35+
36+
- uses: actions/upload-pages-artifact@v3
37+
with:
38+
path: dist
39+
40+
- id: deployment
41+
uses: actions/deploy-pages@v4

README.md

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,43 @@
1+
# Wedding invitation
2+
13
Свадьба, свадьба! Кольца, кольца!
24

3-
https://ruminat.github.io/wedding
5+
Live site: https://ruminat.github.io/wedding
6+
7+
## Development
8+
9+
```sh
10+
cp .env.example .env
11+
npm install
12+
npm run dev
13+
```
14+
15+
## Environment variables
16+
17+
| Variable | Where | Description |
18+
| --- | --- | --- |
19+
| `VITE_FORM_HANDLE` | `.env` locally, GitHub Actions variable in production | RSVP API URL |
20+
21+
## Personalized invite links
22+
23+
| Parameter | Description |
24+
| --- | --- |
25+
| `who` | Guest name (e.g. `Дорогая Олечка`) |
26+
| `plural` | Plural verb forms |
27+
| `fool` | Tweak button labels |
28+
| `scriptURL` | Override the RSVP API URL |
29+
30+
Example:
31+
32+
```
33+
https://ruminat.github.io/wedding/?who=Дорогие%20Катя%20и%20Денис&plural
34+
```
35+
36+
## Deployment
37+
38+
Every commit to `main` deploys to GitHub Pages.
39+
40+
One-time setup:
41+
42+
1. **Settings → Secrets and variables → Actions → Variables** — add `VITE_FORM_HANDLE`
43+
2. **Settings → Pages** — set source to **GitHub Actions**

0 commit comments

Comments
 (0)