Skip to content

Commit

Permalink
add workflow for page deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
CWSites committed Mar 29, 2024
1 parent d6b98dd commit 7535802
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Deploy to GitHub Pages

on:
workflow_dispatch:
push:
branches:
- main

jobs:
# https://github.com/sterlingwes/gh-pages-deploy-action
github-pages:
name: Publish Latest to GitHub Pages
runs-on: ubuntu-latest

steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
ref: ${{ github.sha }}

- name: Install and Build 🔧
run: |
npm install
npm run build
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: dist
token: ${{ secrets.TOKEN }}
2 changes: 1 addition & 1 deletion host-app/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const App = () => {

const loadRemoteFromProps = () => {
const url =
"https://CWSites.github.io/module-federation-remote/remoteEntry.js";
"https://raw.githubusercontent.com/CWSites/module-federation-remote/gh-pages/remoteEntry.js";
const scope = "demo_remote_app";
const module = "./HelloUniverse";

Expand Down
2 changes: 1 addition & 1 deletion host-app/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ module.exports = {
remotes: {
remote_app: "remote_app@http://localhost:8081/remoteEntry.js",
demo_remote_app:
"demo_remote_app@https://CWSites.github.io/module-federation-remote/remoteEntry.js",
"demo_remote_app@https://raw.githubusercontent.com/CWSites/module-federation-remote/gh-pages/remoteEntry.js",
},
shared: {
...dependencies,
Expand Down

0 comments on commit 7535802

Please sign in to comment.