Update build.mjs #124
This file contains hidden or 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: Deploy GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
pages: write | |
id-token: write | |
steps: | |
# 1. Checkout the repo | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
# 2. Set up Node.js | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
cache: 'npm' | |
# 3. Install dependencies (including devDependencies) | |
- name: Install dependencies | |
run: npm install --workspaces | |
# 4. Build TEL Frontend package and review site | |
- name: Build project | |
run: npm run build | |
# 5. Upload artifact for GitHub Pages | |
- name: Upload GitHub Pages artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: packages/tel-frontend-review/dist | |
# 6. Deploy to GitHub Pages | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |