Skip to content

fix(tiktok): get correct video file URL #128

fix(tiktok): get correct video file URL

fix(tiktok): get correct video file URL #128

name: deployment-web
on:
push:
branches:
- dev
- main
paths:
- '.github/workflows/deployment-web.yml'
- 'src/Squidlr/**'
- 'src/Squidlr.Web/**'
workflow_dispatch:
env:
# Disable the .NET logo in the console output.
DOTNET_NOLOGO: true
# Disable the .NET first time experience to skip caching NuGet packages and speed up the build.
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
# Disable sending .NET CLI telemetry to Microsoft.
DOTNET_CLI_TELEMETRY_OPTOUT: true
DEV_STAGE_BRANCH: dev
PROD_STAGE_BRANCH: main
jobs:
build:
runs-on: ubuntu-latest
permissions:
statuses: write
checks: write
contents: write
pull-requests: write
actions: write
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_NOLOGO: true
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.x'
- uses: actions/cache@v4
with:
path: ~/.nuget/packages
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget
- name: Install dependencies
run: dotnet restore src/Squidlr.Web/Squidlr.Web.csproj
- name: Build
run: dotnet build src/Squidlr.Web/Squidlr.Web.csproj --configuration Release --no-restore
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: Set vars for dev stage
run: |
echo "ENVIRONMENT=staging" >> $GITHUB_ENV
if: ${{ github.ref_name == env.DEV_STAGE_BRANCH }}
- name: Set vars for production stage
run: |
echo "ENVIRONMENT=prod" >> $GITHUB_ENV
if: ${{ github.ref_name == env.PROD_STAGE_BRANCH }}
- name: Checkout
uses: actions/checkout@v4
- name: Set environment variables
uses: ./.github/actions/setvars
with:
varFilePath: ./.github/variables/vars.${{ env.ENVIRONMENT }}.env
- name: Log in to Azure
uses: azure/login@v2
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Build and deploy web container image
uses: azure/container-apps-deploy-action@v1
with:
appSourcePath: ${{ github.workspace }}
dockerfilePath: src/Squidlr.Web/Dockerfile
acrName: ${{ env.ACR_NAME }}
imageToBuild: ${{ env.ACR_LOGIN_SERVER }}/squidlr-web:${{ github.sha }}
containerAppName: ${{ env.CONTAINER_APP_NAME_WEB }}
resourceGroup: ${{ env.RESOURCE_GROUP_NAME }}
disableTelemetry: true