-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (61 loc) · 1.93 KB
/
Copy pathdeploy-shell.yml
File metadata and controls
71 lines (61 loc) · 1.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Deploy shell
# The shell (Module Federation host) is served at the site root:
# http://codestar.nl/nx-reference/
# Only apps/demo (and shared libs) changes trigger this workflow — a portfolio
# remote change never rebuilds the shell, demonstrating module-federation
# loose coupling.
on:
push:
branches: [main]
paths:
- 'apps/demo/src/**'
- 'apps/demo/public/**'
- 'apps/demo/federation.config.js'
- 'apps/demo/federation.manifest.prod.json'
- 'apps/demo/project.json'
- 'apps/demo/tsconfig*.json'
- 'libs/**'
- 'package.json'
- 'package-lock.json'
- 'nx.json'
- 'tsconfig.base.json'
- '.github/workflows/deploy-shell.yml'
- '.github/actions/deploy-subdir/**'
workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
# Serialize with the other Pages deploys so storage-branch writes never race.
concurrency:
group: pages
cancel-in-progress: false
jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout 🛎️
uses: actions/checkout@v7
- name: Use Node.js 24 🟢
uses: actions/setup-node@v6
with:
node-version: '24'
cache: 'npm'
- name: Install dependencies 🔧
run: npm ci
- name: Build shell 🏗️
run: npx nx build demo --configuration=production
- name: Apply production federation manifest 🔗
run: cp apps/demo/federation.manifest.prod.json dist/apps/demo/browser/federation.manifest.json
- name: Assemble site root 🧩
uses: ./.github/actions/deploy-subdir
with:
source-dir: dist/apps/demo/browser
target-subdir: ''
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy to GitHub Pages 🚀
id: deployment
uses: actions/deploy-pages@v5