Cleanup Comments #40
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: Angular CI/CD | |
on: | |
push: | |
branches: | |
- main # Change this to your main branch | |
jobs: | |
# Build job | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "18" | |
check-latest: true | |
- name: Install Angular CLI | |
run: npm install -g @angular/cli | |
- name: Install dependencies | |
run: npm install | |
- name: Build Angular app | |
run: ng build --configuration=production --output-path docs --base-href=/random-albanian-user-generator/ | |
- name: List contents of the 'docs' directory | |
run: ls docs/assets | |
- name: Upload artifacts | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
name: github-pages | |
path: docs # Output folder of the Angular build | |
# Deploy job | |
deploy: | |
needs: build | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action | |