Bump next from 15.4.2 to 16.0.1 #265
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Vercel Production Deployment | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| types: [closed] | |
| workflow_dispatch: | |
| jobs: | |
| deployment: | |
| if: (github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch') | |
| runs-on: ubuntu-latest | |
| concurrency: Production | |
| environment: | |
| name: Production | |
| url: ${{ steps.get_release_url.outputs.release_url }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Vercel CLI | |
| run: npm install -g vercel | |
| - name: Link Vercel Project | |
| run: vercel link --token=${{secrets.VERCEL_TOKEN}} --project ${{vars.VERCEL_PROJECT}} --yes | |
| - name: Deploy with Vercel | |
| run: vercel deploy --prod -f --token=${{secrets.VERCEL_TOKEN}} >deployment-url.txt 2>error.txt | |
| - name: Set release url | |
| id: get_release_url | |
| run: echo release_url="https://gakuseibot.pkopko.jp" >> $GITHUB_OUTPUT | |
| - name: Faild Log | |
| if: failure() | |
| run: | | |
| if [ -s error.txt ]; then | |
| cat error.txt | |
| exit 1 | |
| fi | |
| - name: Show Deployment URL | |
| run: | | |
| deploy_url=$(cat deployment-url.txt) >> $GITHUB_ENV | |
| echo "Deployment URL: $deploy_url" |