Skip to content

Commit

Permalink
test new yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Babali42 committed Dec 17, 2024
1 parent 5978a57 commit 334aca7
Showing 1 changed file with 25 additions and 16 deletions.
41 changes: 25 additions & 16 deletions .github/workflows/deploy-ghpage.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,33 @@
name: Build and Deploy
name: Deploy Angular App to GitHub Pages

on:
push:
branches:
- main
jobs:
build:
- main # Adjust this to your default branch

jobs:
build-and-deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: All things angular
uses: AhsanAyaz/[email protected] ## replace by latest version without it you will see Expected format {org}/{repo}[/path]@ref. Actual 'AhsanAyaz/angular-deploy-gh-pages-actions',Input string was not in a correct format.
with:
github_access_token: ${{ secrets.GHPAGES }}
build_configuration: production # The build environment for the app. please look configurations in your angular.json
deploy_branch: gh-pages # The branch the action should deploy to.
angular_project_dir: ./frontend
base_href: '' # empty
angular_dist_build_folder: ../dist # The folder where your project is supposed to be after running ng build by the action.
- name: Checkout Repository
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18 # Ensure this matches your project's Node.js version

- name: Install Dependencies
run: npm install
working-directory: frontend/angularApp

- name: Build Angular App
run: npm run build -- --output-path ../dist
working-directory: frontend/angularApp

permissions:
contents: write # Allow write permission to GITHUB_TOKEN to commit to deploy branch.
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GH_PAGES }}
publish_dir: dist

0 comments on commit 334aca7

Please sign in to comment.