@@ -2,10 +2,6 @@ name: Continuous Delivery
22
33on :
44 workflow_dispatch :
5- inputs :
6- prNumber :
7- description : The number of the PR that is being deployed
8- required : true
95 push :
106 branches :
117 - main
@@ -21,71 +17,21 @@ jobs:
2117 fetch-depth : 0
2218 - name : Add TypeScript problem matcher
2319 run : echo "::add-matcher::.github/problemMatchers/tsc.json"
24- - name : Use Node.js v16
20+ - name : Use Node.js v18
2521 uses : actions/setup-node@v3
2622 with :
27- node-version : 16
23+ node-version : 18
2824 cache : yarn
2925 registry-url : https://registry.yarnpkg.com/
3026 - name : Install Dependencies
3127 run : yarn --immutable
3228 - name : Bump Version & Publish
3329 run : |
34- # Resolve the tag to be used. "next" for push events, "pr-{prNumber}" for dispatch events.
35- TAG=$([[ ${{ github.event_name }} == 'push' ]] && echo 'next' || echo 'pr-${{ github.event.inputs.prNumber }}')
36-
3730 yarn config set npmAuthToken ${NODE_AUTH_TOKEN}
3831 yarn config set npmPublishRegistry "https://registry.yarnpkg.com"
3932
40- yarn bump --preid "${TAG} .$(git rev-parse --verify --short HEAD)"
33+ yarn bump --preid "next .$(git rev-parse --verify --short HEAD)"
4134
42- yarn npm publish --tag ${TAG}
35+ yarn npm publish --tag next
4336 env :
4437 NODE_AUTH_TOKEN : ${{ secrets.NPM_PUBLISH_TOKEN }}
45-
46- Docgen :
47- name : Docgen
48- runs-on : ubuntu-latest
49- if : " github.event_name == 'push'"
50- steps :
51- - name : Checkout Project
52- uses : actions/checkout@v3
53- - name : Checkout Project
54- uses : actions/checkout@v3
55- with :
56- ref : gh-pages
57- path : out
58- - name : Use Node.js v16
59- uses : actions/setup-node@v3
60- with :
61- node-version : 16
62- cache : yarn
63- registry-url : https://registry.yarnpkg.com/
64- - name : Install Dependencies
65- run : yarn --immutable
66- - name : Build documentation
67- run : yarn docs
68- - name : Publish Docs
69- if : github.ref == 'refs/heads/main'
70- run : |
71- echo -e "\n# Remove any old files in the out folder"
72- rm -rfv out/assets/*
73- rm -rfv out/interfaces/*
74- rm -rfv out/*.html
75-
76- echo -e "\n# Move the generated docs to the newly-checked-out repo, to be committed and pushed"
77- rsync -vaI LICENSE.md out/
78- rsync -vaI README.md out/
79- rsync -vaI docs/ out/
80-
81- echo -e "\n# Commit and push"
82- cd out
83- git add --all .
84- git config user.name "${GITHUB_ACTOR}"
85- git config user.email "${GITHUB_EMAIL}"
86- git commit -m "docs: api docs build for ${GITHUB_SHA}" || true
87- git push origin $TARGET_BRANCH
88- env :
89- GITHUB_TOKEN : ${{ secrets.SKYRA_TOKEN }}
90- GITHUB_ACTOR : NM-EEA-Y
91-
0 commit comments