Skip to content

Fix the prepare artifact steps #31

Fix the prepare artifact steps

Fix the prepare artifact steps #31

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
permissions:
actions: write
contents: write
pages: write
id-token: write
deployments: 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
- name: Set SHAs
uses: nrwl/nx-set-shas@v4
with:
main-branch-name: 'master'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- 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: Prepare artifact
run: |
mkdir -p dist/production
cp -r dist/apps/dashboard/* dist/production/
cp -r dist/apps/login/* dist/production/login/
cp -r dist/apps/todo/* dist/production/todo/
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: dist/production
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4