Skip to content

(Testing Github Actions) Attempt to url for vercel #15

(Testing Github Actions) Attempt to url for vercel

(Testing Github Actions) Attempt to url for vercel #15

Workflow file for this run

name: Vercel Production Deployment
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
on:
push:
branches:
- master
jobs:
Deploy-Production:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Inject API token into vercel config
uses: sergeysova/jq-action@v2
id: rewrites
with:
cmd: jq --arg token ${{ secrets.PUB_LYCHEE_KEY }} --arg baseurl ${{ secrets.LYCHEE_BASE_URL }} '.|.rewrites[0].has[0].value="Bearer $token"|.rewrites[0].destination=$baseurl' vercel.json > tmpvercel.json && mv tmpvercel.json vercel.json
- name: Test Output
id: inject_output
uses: ActionsTools/read-json-action@main
with:
file_path: "vercel.json"
- run: |
echo ${{ steps.inject_output.outputs.rewrites }}
- name: Install Vercel CLI
run: npm install --global vercel
- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
- name: Build Project Artifacts
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy Project Artifacts
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}