Migrate to base href and prod build. #6
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: Deploy Angular App to GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the repository | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
# Set up Node.js | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 # Adjust if you're using a different Node.js version | |
# Install dependencies | |
- name: Install dependencies | |
run: corepack enable && corepack prepare pnpm@latest-9 --activate && pnpm config set store-dir .pnpm-store && pnpm install | |
# Build the Angular app | |
- name: Build Angular app | |
run: pnpm run ghbuild | |
# Deploy to GitHub Pages | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: dist/VirusSimulator/browser |