Rework model load mechanism to avoid selecting model when none is loaded #318
This file contains hidden or 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
name: Website Builder | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- .github/workflows/website-builder.yml | |
- website/** | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Install Node | |
run: | | |
sudo apt install nodejs | |
- name: Build website | |
run: | | |
GITREF=${{ github.ref_name }} | |
ZIPFILE=aws-deepracer-community-device-console-${GITREF//\//-}.zip | |
pwd | |
cd website | |
npm install | |
npm run build | |
cd dist | |
rm -f ../../$ZIPFILE && zip -r ../../$ZIPFILE . | |
cd ../../ | |
- name: Create deb package | |
run: | | |
./deepracer-build-pkg.sh | |
- name: Create a draft release | |
if: ${{ github.ref_type == 'branch' }} | |
run: | | |
GITREF=${{ github.ref_name }} | |
ZIPFILE=aws-deepracer-community-device-console-${GITREF//\//-}.zip | |
DEBFILE=$(compgen -G dist/aws-deepracer-community-device-console*.deb) | |
gh release create --draft --prerelease --title "Branch: ${{ github.ref_name }}, Job: ${{ github.run_id }}" --target ${{ github.ref_name }} --generate-notes --notes "Draft Release from Branch: ${{ github.ref_name }}, Action Job id: ${{ github.run_id }} Auto-generated draft release from workflow https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" v${{ github.run_id }} $ZIPFILE $DEBFILE | |
rm $ZIPFILE | |
rm $DEBFILE | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Update assets on the release | |
if: ${{ github.ref_type == 'tag' }} | |
run: | | |
set -x | |
GITREF=${{ github.ref_name }} | |
ZIPFILE=aws-deepracer-community-device-console-${GITREF//\//-}.zip | |
DEBFILE=$(compgen -G dist/aws-deepracer-community-device-console*.deb) | |
gh release view ${{ github.ref_name }} > release_info.txt | |
for ASSET in $(grep ^asset: release_info.txt | sed 's/asset://') | |
do | |
echo "Deleting asset $ASSET" | |
gh release delete-asset ${{ github.ref_name }} $ASSET | |
done | |
gh release upload --clobber ${{ github.ref_name }} $ZIPFILE $DEBFILE | |
rm $ZIPFILE | |
rm $DEBFILE | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |