-
Notifications
You must be signed in to change notification settings - Fork 171
61 lines (55 loc) · 2.1 KB
/
ghpages.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Validate GitHub Pages site
on:
## Pre-PR approval, Status checks that are required (needs to have job called 'Validation'), or PR will not merge
pull_request:
# Target branch (any source branch)
branches: [main]
paths:
- ".github/workflows/ghpages.yml"
- "helper/**"
workflow_dispatch:
inputs:
REACT_APP_TEMPLATERELEASE:
required: false
type: string
default: ''
description: 'Test against an older release tag? (Provided the tag)'
doAzCmdDeployment:
description: 'Test AZ Cmd by deploying to an Azure subscription'
default: false
type: boolean
required: false
jobs:
SetupWF:
runs-on: ubuntu-latest
outputs:
REACT_APP_TEMPLATERELEASE: ${{ github.event.inputs.REACT_APP_TEMPLATERELEASE }}
doAzCmdDeployment: ${{ github.event.inputs.doAzCmdDeployment }}
steps:
- name: Reusable workflow
run: |
echo "Resuable workflows can't be directly passed ENV/INPUTS (yet)"
echo "So we need this job to be able to access the value in env.RG"
echo "see https://github.community/t/reusable-workflow-env-context-not-available-in-jobs-job-id-with/206111"
Validation:
needs: [SetupWF]
uses: ./.github/workflows/ghpagesTest.yml
with:
REACT_APP_TEMPLATERELEASE: ${{ needs.SetupWF.outputs.REACT_APP_TEMPLATERELEASE }}
doAzCmdDeployment: ${{ needs.SetupWF.outputs.doAzCmdDeployment == 'true' }}
secrets:
AZURE_CREDENTIALS: ${{ secrets.AZURE_CREDENTIALS }}
Spelling:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: streetsidesoftware/[email protected]
name: Spell Check
if: ${{github.event_name!='workflow_dispatch'}}
with:
config: './cspell.json'
inline: warning
root: '.'
files: "**/*.{ts,js,md}" #You need to respecify this setting - even though it's in the cspell.json config :(
incremental_files_only: false
strict: true #setting to false allows the build to continue even if spelling mistakes are detected