Skip to content

Commit 2a6ac6b

Browse files
committed
restore deploy workflows, adapted to v2026 layout
Re-add production.yml (push to main → s3://pysv-web) and staging.yml (PRs → s3://pysv-web-staging). Adjustments vs. the pre-2026 versions: - drop `cd website`; lektorproject is at repo root now - replace requirements_deploy.txt with `uv sync --frozen` - update path filters (content/, templates/, models/, databags/, assets/, psv.lektorproject, pyproject.toml, uv.lock) - bump actions/checkout and configure-aws-credentials to v4
1 parent 8d375c3 commit 2a6ac6b

2 files changed

Lines changed: 87 additions & 0 deletions

File tree

.github/workflows/production.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Upload Production Website
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'content/**'
9+
- 'templates/**'
10+
- 'models/**'
11+
- 'databags/**'
12+
- 'assets/**'
13+
- 'psv.lektorproject'
14+
- 'pyproject.toml'
15+
- 'uv.lock'
16+
- '.github/workflows/production.yml'
17+
18+
jobs:
19+
deploy:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Set up uv
26+
uses: astral-sh/setup-uv@v4
27+
with:
28+
enable-cache: true
29+
30+
- name: Install dependencies
31+
run: uv sync --frozen
32+
33+
- name: Configure AWS Credentials
34+
uses: aws-actions/configure-aws-credentials@v4
35+
with:
36+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
37+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
38+
aws-region: eu-central-1
39+
40+
- name: Build and deploy to S3
41+
run: |
42+
uv run lektor project-info
43+
uv run lektor build --output-path ./www
44+
aws s3 sync ./www s3://pysv-web --delete

.github/workflows/staging.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Upload Staging Website
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
paths:
7+
- 'content/**'
8+
- 'templates/**'
9+
- 'models/**'
10+
- 'databags/**'
11+
- 'assets/**'
12+
- 'psv.lektorproject'
13+
- 'pyproject.toml'
14+
- 'uv.lock'
15+
- '.github/workflows/staging.yml'
16+
17+
jobs:
18+
deploy:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Set up uv
25+
uses: astral-sh/setup-uv@v4
26+
with:
27+
enable-cache: true
28+
29+
- name: Install dependencies
30+
run: uv sync --frozen
31+
32+
- name: Configure AWS Credentials
33+
uses: aws-actions/configure-aws-credentials@v4
34+
with:
35+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
36+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
37+
aws-region: eu-central-1
38+
39+
- name: Build and deploy to staging S3
40+
run: |
41+
uv run lektor project-info
42+
uv run lektor build --output-path ./www
43+
aws s3 sync ./www s3://pysv-web-staging --delete

0 commit comments

Comments
 (0)