mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-09 20:50:20 +08:00
Consolidate subscription usage policy enforcement, privacy-safe persistence, and gateway security hardening into one reviewable change. Includes bounded HTTP and execution envelopes, header and protocol guards, DNS and relay validation, authentication and secret projection hardening, secure backup/install paths, and regression coverage.
98 lines
2.5 KiB
YAML
98 lines
2.5 KiB
YAML
name: Deploy to GitHub Pages
|
|
|
|
on:
|
|
push:
|
|
tags: ['v*']
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: pages
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
preflight:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
deploy_pages: ${{ steps.classify.outputs.deploy_pages }}
|
|
steps:
|
|
- name: Ensure stable Pages release tag
|
|
id: classify
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
echo "deploy_pages=false" >> "${GITHUB_OUTPUT}"
|
|
|
|
if [[ "${GITHUB_REF_TYPE}" != "tag" ]]; then
|
|
echo "Manual Pages deployment."
|
|
echo "deploy_pages=true" >> "${GITHUB_OUTPUT}"
|
|
exit 0
|
|
fi
|
|
|
|
tag="${GITHUB_REF_NAME}"
|
|
if [[ ! "${tag}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
|
echo "Skipping Pages deploy for non-stable release tag: ${tag}"
|
|
exit 0
|
|
fi
|
|
|
|
echo "deploy_pages=true" >> "${GITHUB_OUTPUT}"
|
|
|
|
build:
|
|
needs: preflight
|
|
if: needs.preflight.outputs.deploy_pages == 'true'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
|
|
with:
|
|
node-version: '22'
|
|
cache: 'npm'
|
|
cache-dependency-path: |
|
|
frontend/package-lock.json
|
|
aether-vscodex/web/package-lock.json
|
|
|
|
- name: Build aether-vscodex web
|
|
working-directory: aether-vscodex/web
|
|
run: |
|
|
npm ci
|
|
npm run build
|
|
|
|
- name: Install dependencies
|
|
working-directory: frontend
|
|
run: npm ci
|
|
|
|
- name: Build
|
|
working-directory: frontend
|
|
env:
|
|
GITHUB_PAGES: 'true'
|
|
run: npm run build
|
|
|
|
- name: Copy index.html to 404.html for SPA routing
|
|
run: cp frontend/dist/index.html frontend/dist/404.html
|
|
|
|
- name: Setup Pages
|
|
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
|
|
with:
|
|
path: frontend/dist
|
|
|
|
deploy:
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
permissions:
|
|
id-token: write
|
|
pages: write
|
|
steps:
|
|
- name: Deploy to GitHub Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4
|