Update ci.yaml to deploy the artifact on github pages. #26
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: CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
permissions: | |
actions: write | |
contents: write | |
pages: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'npm' | |
- run: npm ci --legacy-peer-deps | |
- uses: nrwl/nx-set-shas@v4 | |
- name: Build apps | |
run: | | |
npm run nx build dashboard --base-href=/ng-mf/ | |
npm run nx build login --base-href=/ng-mf/ | |
npm run nx build todo --base-href=/ng-mf/ | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: dist/apps/dashboard | |
deploy: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |