Skip to content

Try to downgrade

Try to downgrade #757

Workflow file for this run

name: Build and Deploy Web - DEV
on:
push:
branches:
- master
env:
EDGIO_ENV: dev
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN}}
jobs:
build-deploy-web:
name: Deploy Web Dev
environment:
name: dev
url: https://dev.coh3stats.com/
runs-on: ubuntu-latest
concurrency:
group: deploy-master-to-dev
cancel-in-progress: true
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@master
with:
node-version: "20.x"
- name: Cache node modules
uses: actions/cache@v4
env:
cache-name: cache-node-modules-v2
with:
path: |
node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Deps
run: yarn --prefer-offline --frozen-lockfile install
- name: Disable Vercel telemetry
run: yarn next telemetry disable
- name: Create Sentry release
uses: getsentry/action-release@master
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: coh-stats
SENTRY_PROJECT: coh3-stats-web
with:
environment: ${{ env.EDGIO_ENV }}
ignore_empty: true
ignore_missing: true
- name: Deploy to Netlify hosting
env:
NETLIFY_AUTH_TOKEN: ${{secrets.NETLIFY_AUTH_TOKEN}}
NETLIFY_SITE_ID: ${{secrets.NETLIFY_SITE_ID_DEV}}
NODE_VERSION: "20.x"
run: |
npx netlify --telemetry-disable
netlify deploy --build --prod
# - name: Deploy to Edgio hosting
# env:
# DEPLOY_TOKEN: ${{ secrets.EDGIO_V7_DEPLOY_TOKEN}}
# # Deploy command automatically runs the build
# # Deploy command pulls ENV variables https://docs.edg.io/guides/basics/environments#environment-variables
# run: |
# npx edgio deploy --property=coh3-stats --organization=coh-stats -e $EDGIO_ENV --token $DEPLOY_TOKEN
# npx edgio cache-clear --property=coh3-stats --organization=coh-stats -e $EDGIO_ENV --token $DEPLOY_TOKEN --path=/
- name: Deploy to Vercel hosting
env:
VERCEL_TOKEN: ${{secrets.VERCEL_TOKEN}}
VERCEL_ORG_ID: ${{secrets.VERCEL_ORG_ID}}
VERCEL_PROJECT_ID: ${{secrets.VERCEL_PROJECT_ID}}
run: |
npx vercel telemetry disable
npx vercel pull --yes --environment=preview --token=$VERCEL_TOKEN
npx vercel build --token=$VERCEL_TOKEN
npx vercel deploy --prebuilt --token=$VERCEL_TOKEN >deployment-url.txt 2>error.txt
code=$?
if [ $code -eq 0 ]; then
# Now you can use the deployment url from stdout for the next step of your workflow
deploymentUrl=`cat deployment-url.txt`
npx vercel alias $deploymentUrl dev.coh3stats.com --token=$VERCEL_TOKEN --scope cohstats
else
# Handle the error
errorMessage=`cat error.txt`
echo "There was an error: $errorMessage"
fi