mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-16 15:40:11 +01:00
43 lines
1.1 KiB
YAML
43 lines
1.1 KiB
YAML
name: Deploy Angular to EC2
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build-and-deploy:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 18
|
|
|
|
- name: Install Dependencies
|
|
run: npm ci
|
|
|
|
- name: Build Angular App
|
|
run: npm run build -- --configuration=production
|
|
|
|
- name: Copy files to EC2 via SCP
|
|
uses: appleboy/scp-action@v0.1.7
|
|
with:
|
|
host: ${{ secrets.EC2_HOST }}
|
|
username: ${{ secrets.EC2_USER }}
|
|
key: ${{ secrets.EC2_SSH_KEY }}
|
|
source: "dist/**" # or dist/your-app-name/**
|
|
target: "/var/www/angular-app"
|
|
|
|
- name: Trigger Accessibility Framework
|
|
if: ${{ success() }} # or failure(), or always()
|
|
uses: peter-evans/repository-dispatch@v3
|
|
with:
|
|
token: ${{ secrets.REPO_ALLY_PAT }}
|
|
repository: punkam23/accessibility-testing-framework
|
|
event-type: build_completed
|
|
client-payload: '{"commit_sha": "${{ github.sha }}"}'
|