-
Notifications
You must be signed in to change notification settings - Fork 316
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4906 from himeshsiriwardana/build-script-update
modified build script to release 2 assets
- Loading branch information
Showing
2 changed files
with
40 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,22 +90,35 @@ jobs: | |
|
||
- name: Build MkDocs Documentation | ||
run: | | ||
unset ENABLE_HOOKS | ||
cd en/asgardeo | ||
mkdocs build | ||
cd ../../ | ||
- name: Conditionally build MkDocs Documentation | ||
run: | | ||
export ENABLE_HOOKS=true | ||
cd en/asgardeo | ||
mkdocs build --site-dir prod-build | ||
cd ../../ | ||
- name: Zip the Documentation | ||
run: | | ||
mkdir -p out/asgardeo/docs | ||
mkdir -p out-prod/asgardeo/docs | ||
cp -r ./en/asgardeo/site/* out/asgardeo/docs/ | ||
cp -r ./en/asgardeo/prod-build/* out-prod/asgardeo/docs/ | ||
zip -r asgardeo-docs-${{ env.NEW_VERSION }}.zip ./out | ||
zip -r asgardeo-docs-${{ env.NEW_VERSION }}-prod.zip ./out-prod | ||
- name: Create git tag | ||
run: | | ||
git config user.name $GIT_USERNAME | ||
git config user.email $GIT_USER_EMAIL | ||
git tag "v${{ env.NEW_VERSION }}" | ||
git tag "v${{ env.NEW_VERSION }}-prod" | ||
git push "https://$GIT_USERNAME:[email protected]/${{ github.repository }}" "v${{ env.NEW_VERSION }}" | ||
git push "https://$GIT_USERNAME:[email protected]/${{ github.repository }}" "v${{ env.NEW_VERSION }}-prod" | ||
- name: Create Release | ||
id: create_release | ||
|
@@ -115,6 +128,15 @@ jobs: | |
release_name: Asgardeo Docs - v${{ env.NEW_VERSION }} | ||
draft: false | ||
prerelease: ${{ env.IS_HOTFIX == 'true' }} | ||
|
||
- name: Create prod release | ||
id: create_prod_release | ||
uses: actions/create-release@v1 | ||
with: | ||
tag_name: v${{ env.NEW_VERSION }}-prod | ||
release_name: Asgardeo Docs - v${{ env.NEW_VERSION }}-prod | ||
draft: false | ||
prerelease: ${{ env.IS_HOTFIX == 'true' }} | ||
|
||
- name: Upload Release Asset | ||
uses: actions/upload-release-asset@v1 | ||
|
@@ -123,6 +145,14 @@ jobs: | |
asset_path: ./asgardeo-docs-${{ env.NEW_VERSION }}.zip | ||
asset_name: asgardeo-docs-${{ env.NEW_VERSION }}.zip | ||
asset_content_type: application/zip | ||
|
||
- name: Upload Prod Release Asset | ||
uses: actions/upload-release-asset@v1 | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./asgardeo-docs-${{ env.NEW_VERSION }}-prod.zip | ||
asset_name: asgardeo-docs-${{ env.NEW_VERSION }}-prod.zip | ||
asset_content_type: application/zip | ||
|
||
- name: Commit and push new version | ||
if: ${{ env.IS_HOTFIX == 'false' }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters