File tree 2 files changed +15
-7
lines changed
2 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -26,15 +26,19 @@ jobs:
26
26
runs-on : ubuntu-latest
27
27
steps :
28
28
- name : Set GIT_BRANCH
29
- run : |
30
- echo "GIT_BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
29
+ run : echo "GIT_BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
30
+ - name : Print GIT_BRANCH
31
+ run : echo $GIT_BRANCH
32
+ - name : Print content
33
+ run : ls -ln
31
34
- name : Print branch if version
32
35
if : ${{ inputs.branch == 'version' }}
33
36
run : echo ${{ inputs.branch }}
34
37
- name : Print branch if main
35
38
if : ${{ inputs.branch == 'main' }}
36
39
run : echo ${{ inputs.branch }}
37
- - uses : actions/checkout@v2
40
+ # This should be set up from earlier
41
+ # - uses: actions/checkout@v2
38
42
- uses : actions/setup-node@v2
39
43
with :
40
44
node-version : 14
55
59
SAS : ${{ secrets.SAS }}
56
60
- name : Rewrite docs paths if version branch
57
61
if : ${{ inputs.branch == 'version' }}
58
- run : node scripts/build-as-doc-version.js ${ GIT_BRANCH}
62
+ run : node scripts/build-as-doc-version.js $( GIT_BRANCH)
59
63
- name : Build site for locale
60
64
run : yarn i18n:build ${{ inputs.locale }}
61
65
env :
Original file line number Diff line number Diff line change @@ -25,13 +25,17 @@ jobs:
25
25
run : ' yarn process-docs-changes'
26
26
env :
27
27
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
28
- - name : branch
29
- run : echo "::set-output name=branch::`git branch --show-current`"
28
+ - id : branch
29
+ name : Calculate branch
30
+ run : |
31
+ [[ $(git branch --show-current) =~ ^v[0-9]+-x-y$ ]] && echo "::set-output name=branch::version" || echo "::set-output name=branch::other"
32
+ - name : Show branch
33
+ run : echo ${{ steps.branch.outputs.branch }}
30
34
# GitHub will not kick the "push-XXX" workflow so we have to publish from here
31
35
build-and-deploy :
32
36
needs : [update-docs]
33
37
# If we are in a version branch, it means we have pushed the changed directly and should deploy
34
- if : ${{ needs.branch .outputs.branch =~ ^v[0-9]+-x-y$ }}
38
+ if : ${{ needs.update-docs .outputs.branch == 'version' }}
35
39
uses : electron/electronjs.org-new/.github/workflows/build-and-deploy.yml@main
36
40
with :
37
41
locale : en
You can’t perform that action at this time.
0 commit comments