Skip to content

Commit 4a45895

Browse files
committed
added frontend deployment pipeline
1 parent ce3dbd1 commit 4a45895

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
2+
name: Build And Deploy Angular Project
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
paths:
7+
- frontend/**/*
8+
- .github/workflows/frontend_deployment.yml
9+
workflow_dispatch:
10+
11+
12+
jobs:
13+
build-and-deploy-frontend:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v3
18+
19+
- name: Set up node.js
20+
uses: actions/setup-node@v3.3.0
21+
with:
22+
node-version: '20.9.0'
23+
cache: 'npm'
24+
cache-dependency-path: frontend/yarn.lock
25+
26+
- name: Build And Deploy Angular Project
27+
env:
28+
CLOUDFLARE_API_TOKEN: ${{ vars.CLOUDFLARE_API_TOKEN }}
29+
CLOUDFLARE_ACCOUNT_ID: ${{ vars.CLOUDFLARE_ACCOUNT_ID }}
30+
run: |
31+
cd frontend
32+
yarn install
33+
yarn test --no-watch --source-map=false --browsers=ChromeHeadless
34+
yarn build --configuration=production
35+
yarn global add wrangler --unsafe-perm=true
36+
wrangler pages publish ./dist --project-name=angular-test-aug --branch=main

0 commit comments

Comments
 (0)