Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Deploy production (celestiary.github.io)

on:
push:
branches:
- main
workflow_dispatch:

concurrency:
group: deploy-prod
cancel-in-progress: false

permissions:
contents: read

jobs:
deploy:
# Skip silently when the cross-repo deploy key hasn't been configured
# yet, so first-time setup doesn't fail the workflow.
if: ${{ secrets.CELESTIARY_GITHUB_IO_DEPLOY_KEY != '' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6.0.2

- uses: ./.github/actions/build
with:
base-path: /

- name: Push built site to celestiary.github.io gh-pages
uses: JamesIves/github-pages-deploy-action@v4.8.0
with:
repository-name: celestiary/celestiary.github.io
branch: gh-pages
folder: docs
ssh-key: ${{ secrets.CELESTIARY_GITHUB_IO_DEPLOY_KEY }}
clean: true
commit-message: "sync from celestiary/web@${{ github.sha }}"
git-config-name: github-actions[bot]
git-config-email: 41898282+github-actions[bot]@users.noreply.github.com
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,18 @@ Edits in the source directory will be available in the app on a page refresh.
For larger changes, it's also a good idea to step through the guide pages (in /guide) to make sure they'll all working.

## Deploy
The app runs at https://celestiary.github.io/ and is in the celestiary.github.io repo. From it grab the changes from the web repo and then push them:

```
git pull upstream main
git push
```
The app is served at https://celestiary.github.io/ (user page, short URL) and
https://celestiary.github.io/web/ (project page). Both deploy automatically
on push to `main` from this repo:

- `.github/workflows/gh-pages.yml` builds with `BASE_PATH=/web/` and pushes
to this repo's `gh-pages` branch root, serving the project page.
- `.github/workflows/deploy-prod.yml` builds with `BASE_PATH=/` and pushes
to `celestiary/celestiary.github.io`'s `gh-pages` branch via an SSH deploy
key (secret `CELESTIARY_GITHUB_IO_DEPLOY_KEY`), serving the user page.

PR previews land at `celestiary.github.io/web/pr-preview/pr-NNN/` via
`.github/workflows/pr-preview.yml`.

## Performance
A first-time session downloads ~3-5MB, mostly of the stars data. Planet textures are lazy-fetched as the user moves around the scene, but will bring that upwards to ~10MB in full.
Expand Down
Loading