Skip to content

Commit

Permalink
add deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
FarahaniMehrshad committed Dec 9, 2023
1 parent 772967e commit 71e667f
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Deployment
on:
push:

jobs:
test:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '16.x'

- name: Install Dependencies
run: npm ci

- name: Build
run: npm run build:prod

- name: Upload Build
if: success()
uses: actions/upload-artifact@v1
with:
name: deploy_dist
path: dist

deploy:
name: Deploy
runs-on: ubuntu-latest
needs: build
steps:
- name: checkout
uses: actions/checkout@v1

- name: Download Build
uses: actions/download-artifact@v1
with:
name: deploy_dist

- name: Deploy to github page
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
GITHUB_TOKEN: ${{ SECRETS.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: deploy_dist/Fall1402-TwoWeek-InternShip-Frontend
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"build:prod": "ng build --base-href=/Fall1402-TwoWeek-InternShip-Frontend/",
"watch": "ng build --watch --configuration development",
"test": "ng test"
},
Expand Down

0 comments on commit 71e667f

Please sign in to comment.