Skip to content

Commit 71a6858

Browse files
committed
ci: auto-sync production from Neptune_Render + carry Pages deploy
Push to Neptune_Render now force-syncs production, which triggers the 3duf.org Pages deploy. deploy-pages.yml lives here too so it survives the sync onto production.
1 parent b5fd731 commit 71a6858

2 files changed

Lines changed: 69 additions & 0 deletions

File tree

.github/workflows/deploy-pages.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Deploy to GitHub Pages (3duf.org)
2+
3+
# Builds the Vue app and publishes dist/ to the gh-pages branch,
4+
# which serves the live site at 3duf.org. Triggered when the
5+
# production branch updates (auto-synced from Neptune_Render).
6+
on:
7+
push:
8+
branches: [production]
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: write
13+
14+
concurrency:
15+
group: pages-deploy
16+
cancel-in-progress: true
17+
18+
jobs:
19+
build-and-deploy:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Set up Node
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: "18"
29+
30+
- name: Install dependencies
31+
run: npm ci --legacy-peer-deps || npm install --legacy-peer-deps
32+
33+
- name: Build
34+
run: NODE_OPTIONS=--openssl-legacy-provider npm run vue-build
35+
36+
- name: Publish to gh-pages
37+
uses: peaceiris/actions-gh-pages@v4
38+
with:
39+
github_token: ${{ secrets.GITHUB_TOKEN }}
40+
publish_dir: ./dist
41+
publish_branch: gh-pages
42+
cname: 3duf.org
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Sync production with Neptune_Render
2+
3+
# Keeps the production branch in lockstep with Neptune_Render (the dev
4+
# branch). Push to Neptune_Render and production follows automatically,
5+
# which triggers the Pages deploy to 3duf.org.
6+
on:
7+
push:
8+
branches:
9+
- Neptune_Render
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: write
14+
15+
jobs:
16+
sync-production:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout Neptune_Render
20+
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
24+
- name: Sync production branch to Neptune_Render
25+
run: |
26+
git checkout -B production origin/Neptune_Render
27+
git push origin production --force-with-lease

0 commit comments

Comments
 (0)