-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
74 lines (63 loc) · 2.23 KB
/
Copy pathaction.yml
File metadata and controls
74 lines (63 loc) · 2.23 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Build
description: Composite GitHub Action to build a brdgm.me application.
inputs:
gh-site-deploy-pat:
description: GH_SITE_DEPLOY_PAT secret
required: true
gh-site-deploy-username:
description: GH_SITE_DEPLOY_USERNAME secret
required: true
gh-site-deploy-email:
description: GH_SITE_DEPLOY_EMAIL secret
required: true
gh-site-deploy-name:
description: GH_SITE_DEPLOY_NAME secret
required: true
stats-forms-url:
description: VITE_STATS_FORM_URL variable
required: false
stats-field-mapping:
description: VITE_STATS_FIELD_MAPPING variable
required: false
outputs:
app-deploy-name:
description: Application deploy name
value: ${{ steps.package_json.outputs.appDeployName }}
runs:
using: composite
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- name: Read properties from package.json
id: package_json
uses: zoexx/github-action-json-file-properties@42c424cc2a0f9dfd36c79aedb70d429c0ae3e3fa # 1.0.7
with:
file_path: package.json
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
with:
node-version: lts/*
cache: npm
- run: npm ci
shell: bash
- run: npm run lint
shell: bash
- run: npm run test:unit
shell: bash
- run: npm run build
shell: bash
env:
VITE_STATS_FORM_URL: ${{ inputs.stats-forms-url }}
VITE_STATS_FIELD_MAPPING: ${{ inputs.stats-field-mapping }}
- name: Copy to Site
uses: cpina/github-action-push-to-another-repository@55306faa4ed53b815ae49e564af8cfb359d32ae2 # v1.7.3
env:
API_TOKEN_GITHUB: ${{ inputs.gh-site-deploy-pat }}
with:
source-directory: dist
destination-repository-username: brdgm
destination-repository-name: brdgm.github.io
destination-github-username: ${{ inputs.gh-site-deploy-username }}
user-email: ${{ inputs.gh-site-deploy-email }}
user-name: ${{ inputs.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 }}