-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (40 loc) · 1.31 KB
/
deploy.yml
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
41
42
43
44
45
46
47
name: Deploy
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
environment:
name: Production
url: "https://brdgm.me/${{ steps.package_json.outputs.appDeployName }}"
steps:
- uses: actions/checkout@v3
- name: Read properties from package.json
id: package_json
uses: zoexx/github-action-json-file-properties@1.0.4
with:
file_path: package.json
- uses: actions/setup-node@v3
with:
node-version: 20
cache: npm
- run: npm install
- run: npm run test:unit
- run: npm run build
- name: Copy to Site
uses: cpina/github-action-push-to-another-repository@v1.7.2
env:
API_TOKEN_GITHUB: ${{ secrets.GH_SITE_DEPLOY_PAT }}
with:
source-directory: dist
destination-repository-username: brdgm
destination-repository-name: brdgm.github.io
destination-github-username: ${{ secrets.GH_SITE_DEPLOY_USERNAME }}
user-email: ${{ secrets.GH_SITE_DEPLOY_EMAIL }}
user-name: ${{ secrets.GH_SITE_DEPLOY_NAME }}
target-branch: main
commit-message: deploy ${{ steps.package_json.outputs.appDeployName }} ${{ steps.package_json.outputs.version }}
target-directory: ${{ steps.package_json.outputs.appDeployName }}