-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (34 loc) · 939 Bytes
/
Copy pathdeploy.yml
File metadata and controls
40 lines (34 loc) · 939 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: CI / CD for Angular
on:
push:
branches: [ "main" ]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up node.js
uses: actions/setup-node@v3.3.0
with:
node-version: '16'
cache: 'npm'
- name: Install dependencies
run: npm ci
# - name: Replace secret
# uses: cschleiden/replace-tokens@v1
# with:
# tokenPrefix: '{'
# tokenSuffix: '}'
# files: 'src/environments/environment.prod.ts'
# env:
# SECRET_API_KEY: ${{ secrets.API_KEY}}
- name: Build
run: npm run build:prod
- name: Deploy to GitHub Pages
uses: crazy-max/ghaction-github-pages@v3
with:
target_branch: gh-pages
build_dir: dist/rickandmorty-app
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}