Publish to the directory the site is served from
Build, test, deploy / site (push) Successful in 6m43s
Build, test, deploy / site (push) Successful in 6m43s
The deploy job's directory under /srv/www defaulted to the repository's name. This repository is pplus-web and the site is served from /srv/www/pplus, so the first job that passed here published to /srv/www/pplus-web and the live site stayed as it was. The default is pplus; SITE_SLUG still overrides it.
This commit is contained in:
3 files changed
+6
-3
No files matched your search
@@ -13,7 +13,7 @@
|
|||||||
# a host that serves /srv/www, so it is the droplet's.
|
# a host that serves /srv/www, so it is the droplet's.
|
||||||
#
|
#
|
||||||
# Repository -> Settings -> Actions -> Variables (all optional):
|
# Repository -> Settings -> Actions -> Variables (all optional):
|
||||||
# SITE_SLUG the directory under /srv/www (defaults to the repository name)
|
# SITE_SLUG the directory under /srv/www (defaults to pplus, the directory docs/Caddyfile serves)
|
||||||
# SITE_URL e.g. https://pplus.scient.ing, turns on the smoke test
|
# SITE_URL e.g. https://pplus.scient.ing, turns on the smoke test
|
||||||
name: Build, test, deploy
|
name: Build, test, deploy
|
||||||
on:
|
on:
|
||||||
@@ -92,7 +92,9 @@ jobs:
|
|||||||
- name: Publish to /srv/www
|
- name: Publish to /srv/www
|
||||||
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
|
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
|
||||||
env:
|
env:
|
||||||
SLUG: ${{ vars.SITE_SLUG || github.event.repository.name }}
|
# not the repository's name: the site is served from /srv/www/pplus, and a job that published to
|
||||||
|
# /srv/www/pplus-web succeeded while the live site stayed as it was
|
||||||
|
SLUG: ${{ vars.SITE_SLUG || 'pplus' }}
|
||||||
GITHUB_SHA: ${{ github.sha }}
|
GITHUB_SHA: ${{ github.sha }}
|
||||||
run: scripts/deploy.sh "$SLUG"
|
run: scripts/deploy.sh "$SLUG"
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ No version has been tagged yet. What programs mean is pplus-core's, and its chan
|
|||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
- The deploy job publishes to `/srv/www/pplus`, the directory the site is served from, unless `SITE_SLUG` says otherwise. Its default was the repository's name, so the job published to `/srv/www/pplus-web` and the live site did not change.
|
||||||
- `docs/Caddyfile` served the page in place at a missing nested path, where its own files could not be found (a blank page). A missing page is sent to `/`; a missing file is a plain 404.
|
- `docs/Caddyfile` served the page in place at a missing nested path, where its own files could not be found (a blank page). A missing page is sent to `/`; a missing file is a plain 404.
|
||||||
- Core's limits reach the site: no text in a pane, a link or a file ends in the engine's own error; a CSV export cannot start a spreadsheet formula; a framed Quarto view cannot make itself taller than 4,000px.
|
- Core's limits reach the site: no text in a pane, a link or a file ends in the engine's own error; a CSV export cannot start a spreadsheet formula; a framed Quarto view cannot make itself taller than 4,000px.
|
||||||
- From the library, the nav's Problems and Reference links opened nothing.
|
- From the library, the nav's Problems and Reference links opened nothing.
|
||||||
|
|||||||
+1
-1
@@ -27,7 +27,7 @@ The swap is one rename, so nobody sees a half-copied site, and a rollback is `ln
|
|||||||
|
|
||||||
What the runner has to bring is small: git and Node (for `actions/checkout`), bash, curl, tar, `sha256sum`, and a `/srv/www` the job can write (or rsync and SSH to the machine that has it, below). The same workflow runs on a runner in host mode (a label registered as `quarto-deploy:host`: steps run on the machine's own shell as the runner's user, which then needs those tools and write access to `/srv/www`); there pixi's package cache and the fetched pixi in `~/.cache` last from job to job.
|
What the runner has to bring is small: git and Node (for `actions/checkout`), bash, curl, tar, `sha256sum`, and a `/srv/www` the job can write (or rsync and SSH to the machine that has it, below). The same workflow runs on a runner in host mode (a label registered as `quarto-deploy:host`: steps run on the machine's own shell as the runner's user, which then needs those tools and write access to `/srv/www`); there pixi's package cache and the fetched pixi in `~/.cache` last from job to job.
|
||||||
|
|
||||||
`SITE_SLUG` (repository variable) names the directory and defaults to the repository name; set it to `pplus`. `SITE_URL` turns on a smoke test that fetches `/VERSION` from the live site and fails the job if it is not the deployed commit. On GitHub Actions the build and test steps run unchanged with `runs-on: ubuntu-latest`; publishing needs the droplet.
|
`SITE_SLUG` (repository variable) names the directory under `/srv/www` and defaults to `pplus`, the directory the Caddyfile serves (it defaulted to the repository's name, and the first job on this repository published to `/srv/www/pplus-web`, which nothing serves). Set `SITE_URL` as well: it turns on a smoke test that fetches `/VERSION` from the live site and fails the job if it is not the deployed commit, which is what catches a job that publishes where nothing is served. On GitHub Actions the build and test steps run unchanged with `runs-on: ubuntu-latest`; publishing needs the droplet.
|
||||||
|
|
||||||
**Once the repositories are public**, a pull request from a fork runs its own workflow file and code on this runner, in a container that can write `/srv/www`. Run pull requests only from branches of the repository itself (each workflow's job has an `if:` that does that), or require approval for fork runs in Gitea's repository settings where the version offers it, or give pull requests a separate runner that cannot write the web root.
|
**Once the repositories are public**, a pull request from a fork runs its own workflow file and code on this runner, in a container that can write `/srv/www`. Run pull requests only from branches of the repository itself (each workflow's job has an `if:` that does that), or require approval for fork runs in Gitea's repository settings where the version offers it, or give pull requests a separate runner that cannot write the web root.
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user