Skip to content

Commit

Permalink
Deploy back to Netlify :D
Browse files Browse the repository at this point in the history
  • Loading branch information
petrvecera committed Jan 2, 2025
1 parent 635421a commit 61c0fa8
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 56 deletions.
57 changes: 29 additions & 28 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ jobs:
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_PROD}}
# NODE_VERSION: "20.x"
# run: |
# npx netlify --telemetry-disable
# netlify deploy --build --prod
- name: Deploy to Netlify hosting
env:
NETLIFY_AUTH_TOKEN: ${{secrets.NETLIFY_AUTH_TOKEN}}
NETLIFY_SITE_ID: ${{secrets.NETLIFY_SITE_ID_PROD}}
NODE_VERSION: "20.x"
run: |
npx netlify --telemetry-disable
netlify deploy --build --prod
#
# - name: Deploy to Vercel hosting
# env:
Expand All @@ -79,23 +79,24 @@ jobs:
# errorMessage=`cat error.txt`
# echo "There was an error: $errorMessage"
# fi
- name: Deploy to Vercel hosting - PV org
env:
VERCEL_TOKEN: ${{secrets.VERCEL_DEPLOY_TOKEN_PV}}
VERCEL_ORG_ID: ${{secrets.VERCEL_ORG_ID_PV}}
VERCEL_PROJECT_ID: ${{secrets.VERCEL_PROJECT_ID_PV}}
run: |
npx vercel telemetry disable
npx vercel pull --yes --environment=production --token=$VERCEL_TOKEN
npx vercel build --prod --token=$VERCEL_TOKEN
npx vercel deploy --prod --prebuilt --archive=tgz --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 coh3stats.com --token=$VERCEL_TOKEN --scope petrveceras-projects
else
# Handle the error
errorMessage=`cat error.txt`
echo "There was an error: $errorMessage"
fi

# - name: Deploy to Vercel hosting - PV org
# env:
# VERCEL_TOKEN: ${{secrets.VERCEL_DEPLOY_TOKEN_PV}}
# VERCEL_ORG_ID: ${{secrets.VERCEL_ORG_ID_PV}}
# VERCEL_PROJECT_ID: ${{secrets.VERCEL_PROJECT_ID_PV}}
# run: |
# npx vercel telemetry disable
# npx vercel pull --yes --environment=production --token=$VERCEL_TOKEN
# npx vercel build --prod --token=$VERCEL_TOKEN
# npx vercel deploy --prod --prebuilt --archive=tgz --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 coh3stats.com --token=$VERCEL_TOKEN --scope petrveceras-projects
# else
# # Handle the error
# errorMessage=`cat error.txt`
# echo "There was an error: $errorMessage"
# fi
57 changes: 29 additions & 28 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ jobs:
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 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}}
Expand Down Expand Up @@ -110,23 +110,24 @@ jobs:
# errorMessage=`cat error.txt`
# echo "There was an error: $errorMessage"
# fi
- name: Deploy to Vercel hosting - PV org
env:
VERCEL_TOKEN: ${{secrets.VERCEL_DEPLOY_TOKEN_PV}}
VERCEL_ORG_ID: ${{secrets.VERCEL_ORG_ID_PV}}
VERCEL_PROJECT_ID: ${{secrets.VERCEL_PROJECT_ID_PV}}
run: |
npx vercel telemetry disable
npx vercel pull --yes --environment=preview --token=$VERCEL_TOKEN
npx vercel build --token=$VERCEL_TOKEN
npx vercel deploy --prebuilt --archive=tgz --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 petrveceras-projects
else
# Handle the error
errorMessage=`cat error.txt`
echo "There was an error: $errorMessage"
fi

# - name: Deploy to Vercel hosting - PV org
# env:
# VERCEL_TOKEN: ${{secrets.VERCEL_DEPLOY_TOKEN_PV}}
# VERCEL_ORG_ID: ${{secrets.VERCEL_ORG_ID_PV}}
# VERCEL_PROJECT_ID: ${{secrets.VERCEL_PROJECT_ID_PV}}
# run: |
# npx vercel telemetry disable
# npx vercel pull --yes --environment=preview --token=$VERCEL_TOKEN
# npx vercel build --token=$VERCEL_TOKEN
# npx vercel deploy --prebuilt --archive=tgz --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 petrveceras-projects
# else
# # Handle the error
# errorMessage=`cat error.txt`
# echo "There was an error: $errorMessage"
# fi

0 comments on commit 61c0fa8

Please sign in to comment.