pg.ddx.io GitHub: postgresql-interfaces/psqlodbc (issues + PRs as email threads)help / color / mirror / Atom feed
[postgresql-interfaces/psqlodbc] PR #227: ci: deploy the website to S3 and CloudFront 3+ messages / 1 participants [nested] [flat]
* [postgresql-interfaces/psqlodbc] PR #227: ci: deploy the website to S3 and CloudFront @ 2026-10-27 18:13 "davecramer (@davecramer)" <noreply+davecramer@github.com> 0 siblings, 0 replies; 3+ messages in thread From: davecramer (@davecramer) @ 2026-10-27 18:13 UTC (permalink / raw) To: postgresql-interfaces/psqlodbc <noreply+postgresql-interfaces-psqlodbc@github.com> Builds the Hugo site in `website/` (#233) in GitHub Actions and deploys it to S3 and CloudFront, following the current pgjdbc site deploy. **Merge #233 first.** This branch is on top of it, because `docs.yml` builds `website/`. ## Workflows - **`docs.yml`** sets up Go and Hugo extended 0.163.3, builds `website/` with `hugo --minify`, and uploads the result as the `site` artifact. Go is there because Hugo downloads the Hextra theme as a module. It also outputs the driver version from `configure.ac`. It runs on pull requests that change `website/`, `Changelog.md`, `docs/` or either workflow, and lints both workflows there with actionlint. The site mounts `Changelog.md` and some `docs/` files, which is why those paths trigger it. - **`docs-deploy.yml`** calls `docs.yml` and deploys the site. It runs only from the `www-release` branch, and a run on any other branch fails before it builds. It does four things in order: 1. Syncs the site to the root of the bucket. 2. Deletes the files that are no longer in the site, in a second pass. This pass never deletes `/backups/`. 3. Uploads `/deploy-info.json`, with the deploy time, version, commit and run ID. 4. Invalidates the CloudFront cache. Each deploy replaces the previous one. To roll back, set `www-release` back to an earlier commit and deploy again. To deploy after a release, move `www-release` to the commit to publish, then run: ```sh gh workflow run docs-deploy.yml -R postgresql-interfaces/psqlodbc --ref www-release ``` ## Needed before the first deploy PostgreSQL infrastructure owns the AWS account and the `postgresql.org` DNS. This is the same setup as jdbc.postgresql.org: 1. An ACM certificate for `odbc.postgresql.org` in `us-east-1`, validated by a CNAME that infrastructure adds to `postgresql.org`. The CAA records already allow Amazon. 2. A private S3 bucket, readable by the distribution through origin access control. `/backups/psqlodbc-cvs.tar.bz2`, which the current site serves but this repository doesn't contain, can go in this bucket, because the deploy never deletes `/backups/`. 3. A CloudFront distribution for `odbc.postgresql.org` that serves the bucket with that certificate. 4. An IAM role: - Trust: GitHub OIDC (`token.actions.githubusercontent.com`) with `sub` = `repo:postgresql-interfaces/psqlodbc:ref:refs/heads/www-release`. - Permissions: `s3:ListBucket`, `s3:PutObject` and `s3:DeleteObject` on the bucket, and `cloudfront:CreateInvalidation` on the distribution. 5. The values for the repository variables `SITE_AWS_ROLE_ARN`, `SITE_AWS_REGION`, `SITE_S3_BUCKET` and `SITE_CLOUDFRONT_DISTRIBUTION_ID`, described at the top of `docs-deploy.yml`. 6. Last, once a deploy has been checked at the `*.cloudfront.net` address: repoint `odbc.postgresql.org` from `jerido.postgresql.org` to the distribution. The `www-release` branch also has to be created from `main` after this merges. ## Testing - actionlint passes on both workflows. - Running `hugo --minify` in `website/` builds the site, with no warnings. - The deploy job has not run, because the AWS resources don't exist yet. Assisted-By: Claude ^ permalink raw [nested|flat] 3+ messages in thread
* Re: [postgresql-interfaces/psqlodbc] PR #227: ci: deploy the website to S3 and CloudFront @ 2026-11-04 11:23 "davecramer (@davecramer)" <noreply+davecramer@github.com> 1 sibling, 0 replies; 3+ messages in thread From: davecramer (@davecramer) @ 2026-11-04 11:23 UTC (permalink / raw) To: postgresql-interfaces/psqlodbc <noreply+postgresql-interfaces-psqlodbc@github.com> @davecramer closed this. ^ permalink raw [nested|flat] 3+ messages in thread
* Re: [postgresql-interfaces/psqlodbc] PR #227: ci: deploy the website to S3 and CloudFront @ 2026-11-04 11:23 "davecramer (@davecramer)" <noreply+davecramer@github.com> 1 sibling, 0 replies; 3+ messages in thread From: davecramer (@davecramer) @ 2026-11-04 11:23 UTC (permalink / raw) To: postgresql-interfaces/psqlodbc <noreply+postgresql-interfaces-psqlodbc@github.com> @davecramer merged this (commit 9b1c0bff6df8). ^ permalink raw [nested|flat] 3+ messages in thread
end of thread, other threads:[~2026-11-04 11:23 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-10-27 18:13 [postgresql-interfaces/psqlodbc] PR #227: ci: deploy the website to S3 and CloudFront "davecramer (@davecramer)" <noreply+davecramer@github.com> 2026-11-04 11:23 ` "davecramer (@davecramer)" <noreply+davecramer@github.com> 2026-11-04 11:23 ` "davecramer (@davecramer)" <noreply+davecramer@github.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox