Added shared part #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Demo | |
on: | |
push: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: "20.x" | |
registry-url: "https://registry.npmjs.org" | |
- name: Install Yarn and gh-pages | |
run: | | |
yarn install | |
npm install -g gh-pages@3.0.0 | |
- name: Build Website | |
run: | | |
npx lerna run build | |
echo "cloud-module-federation.samples.piral.cloud" > packages/host-indirect/dist/CNAME | |
- name: Deploy Website | |
run: | | |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git | |
gh-pages -d "packages/host-indirect/dist" -u "github-actions-bot <support+actions@github.com>" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |