the editable demo site: astro + vendored sveltia CMS + actions pipeline
deploy / build-and-publish (push) Successful in 1m31s
deploy / build-and-publish (push) Successful in 1m31s
This commit is contained in:
commit
c83c3b528d
16 files changed
+6471
No files matched your search
@@ -0,0 +1,30 @@
|
||||
# The editable-site pipeline: every push to main builds the astro site
|
||||
# and swaps it into the publish directory Caddy serves (astro.<base> +
|
||||
# the apex + www). The runner binds /var/lib/astro-site into the job
|
||||
# container at /srv/site (see the app-seed extras nix module).
|
||||
name: deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
build-and-publish:
|
||||
runs-on: node
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Build the site
|
||||
run: |
|
||||
npm --prefix site ci
|
||||
npm --prefix site run build
|
||||
|
||||
- name: Publish (atomic dir swap)
|
||||
run: |
|
||||
set -euo pipefail
|
||||
rm -rf /srv/site/current.new
|
||||
cp -r site/dist /srv/site/current.new
|
||||
rm -rf /srv/site/current.old
|
||||
if [ -d /srv/site/current ]; then mv /srv/site/current /srv/site/current.old; fi
|
||||
mv /srv/site/current.new /srv/site/current
|
||||
rm -rf /srv/site/current.old
|
||||
Reference in new issue
Block a user