diff --git a/.github/actions/deploy-to-netlify/action.yaml b/.github/actions/deploy-to-netlify/action.yaml index 3cfad8f33b..42b1f4c9fe 100644 --- a/.github/actions/deploy-to-netlify/action.yaml +++ b/.github/actions/deploy-to-netlify/action.yaml @@ -39,6 +39,9 @@ inputs: folder: description: Path to the folder to deploy required: true + package_name: + description: The package that will be deployed + required: true runs: using: composite @@ -73,7 +76,7 @@ runs: - name: Install netlify-cli shell: bash - run: pnpm i -g netlify-cli@15 + run: pnpm i -g netlify-cli@16 - name: Deploy preview environment to netlify id: netlify_deploy @@ -81,9 +84,10 @@ runs: env: NETLIFY_AUTH_TOKEN: ${{ inputs.netlify_auth_token }} # run command taken from https://gist.github.com/oneohthree/f528c7ae1e701ad990e6, shortened to 28 chars, prepended with build-number + # edited for netifly v16 run: | url_alias=`echo "preview-${{ inputs.id }}" | iconv -t ascii//TRANSLIT | sed -E 's/[~\^]+//g' | sed -E 's/[^a-zA-Z0-9]+/-/g' | sed -E 's/^-+\|-+$//g' | sed -E 's/^-+//g' | sed -E 's/-+$//g' | tr A-Z a-z` - netlify deploy --alias $url_alias --build false --dir ${{ inputs.folder }} --site ${{ inputs.netlify_site_id }} + netlify deploy --alias $url_alias --build false --dir ${{ inputs.folder }} --site ${{ inputs.netlify_site_id }} --filter ${{inputs.package_name}} echo "url_alias=$url_alias" >> $GITHUB_OUTPUT - name: Prepare Comment Message diff --git a/.github/workflows/deploy-demo.yaml b/.github/workflows/deploy-demo.yaml index 314fc7dd6f..71b96fce78 100644 --- a/.github/workflows/deploy-demo.yaml +++ b/.github/workflows/deploy-demo.yaml @@ -47,3 +47,4 @@ jobs: folder: ${{ steps.build.outputs.folder }} comment_token: ${{ secrets.SWISSPOSTDEVS_ACCESS_TOKEN }} comment_author: swisspost-bot + package_name: demo diff --git a/.github/workflows/deploy-documentation.yaml b/.github/workflows/deploy-documentation.yaml index 492ee73982..aa593e3e21 100644 --- a/.github/workflows/deploy-documentation.yaml +++ b/.github/workflows/deploy-documentation.yaml @@ -42,3 +42,4 @@ jobs: folder: ${{ steps.build.outputs.folder }} comment_token: ${{ secrets.SWISSPOSTDEVS_ACCESS_TOKEN }} comment_author: swisspost-bot + package_name: documentation