Compare commits
2
Commits
0df6b8d473
...
cd618d37d3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cd618d37d3 | ||
|
|
0ae29b5423 |
@@ -0,0 +1,37 @@
|
|||||||
|
# The published Atlas page. Every push to main builds the static site (npm run build -> dist/) and force-pushes it
|
||||||
|
# as the single commit of the `pages` branch. Ken's server serves that branch as plain files (a web server whose
|
||||||
|
# folder is kept in step with the branch: a git-sync sidecar, or `git pull` on a timer). The repository is public,
|
||||||
|
# so his server needs no token. Only the build output is on `pages`, never the raw data.
|
||||||
|
#
|
||||||
|
# Secrets: ATLAS_BOT_TOKEN (as in update-sources.yml), to push the branch.
|
||||||
|
name: Publish the site (pages branch)
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
workflow_dispatch:
|
||||||
|
concurrency:
|
||||||
|
group: pages
|
||||||
|
cancel-in-progress: true
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 20
|
||||||
|
- run: npm run build
|
||||||
|
- name: Push dist/ as the pages branch
|
||||||
|
env:
|
||||||
|
ATLAS_BOT_TOKEN: ${{ secrets.ATLAS_BOT_TOKEN }}
|
||||||
|
run: |
|
||||||
|
cd dist
|
||||||
|
git init -q -b pages
|
||||||
|
git config user.name "Atlas data bot"
|
||||||
|
git config user.email "atlas-bot@noreply.localhost"
|
||||||
|
git add -A
|
||||||
|
git commit -q -m "site built from ${GITHUB_SHA::8}"
|
||||||
|
GIT_CONFIG_COUNT=1 GIT_CONFIG_KEY_0="http.https://git.kenschiano.net/.extraheader" \
|
||||||
|
GIT_CONFIG_VALUE_0="AUTHORIZATION: token $ATLAS_BOT_TOKEN" \
|
||||||
|
git push -q -f "https://git.kenschiano.net/${GITHUB_REPOSITORY}.git" pages
|
||||||
|
echo "pages branch updated from ${GITHUB_SHA::8}"
|
||||||
+2
-2
@@ -13,8 +13,8 @@ branch: main
|
|||||||
# public, limited (only people signed in to this server) or private: who can open the links below
|
# public, limited (only people signed in to this server) or private: who can open the links below
|
||||||
visibility: limited
|
visibility: limited
|
||||||
|
|
||||||
# the published page, when it is hosted somewhere (GitHub Pages is paused while the GitHub account is suspended;
|
# the published page: Ken's server serves the `pages` branch (.gitea/workflows/pages.yml). Set this to its address
|
||||||
# the page is viewed locally or as a Claude artifact meanwhile)
|
# once it is up (then `python -m collection build`): the page's links and the dataset metadata use it.
|
||||||
site: null
|
site: null
|
||||||
|
|
||||||
# other copies of the repository (informational)
|
# other copies of the repository (informational)
|
||||||
|
|||||||
Reference in New Issue
Block a user