-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from gakuseiBOT/dev/vercel
🚀 Add Vercel deployment workflows for preview and production テストもかねてバイパス
- Loading branch information
Showing
4 changed files
with
64 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Vercel Preview Deployment | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
jobs: | ||
deployment: | ||
runs-on: ubuntu-latest | ||
concurrency: Preview | ||
environment: | ||
name: Preview | ||
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 ${{secrets.VERCEL_PROJECT}} --yes | ||
- name: Deploy with Vercel | ||
run: vercel deploy --target=staging --token=${{secrets.VERCEL_TOKEN}} | ||
- name: Set release url | ||
id: get_release_url | ||
run: echo release_url=$(cat deployment-url.txt) >> $GITHUB_OUTPUT | ||
- name: Comment on PR | ||
run: | | ||
cat << EOF > comment.md | ||
## :rocket: Preview Deployment | ||
[Preview Deployment](${{ steps.get_release_url.outputs.release_url }}) | ||
EOF | ||
gh pr comment ${{ github.event.number }} --body-file comment.md | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Vercel Production Deployment | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
deployment: | ||
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 ${{secrets.VERCEL_PROJECT}} --yes | ||
- name: Deploy with Vercel | ||
run: vercel deploy --prod --token=${{secrets.VERCEL_TOKEN}} >deployment-url.txt 2>error.txt | ||
- name: Set release url | ||
id: get_release_url | ||
run: echo release_url=$(cat deployment-url.txt) >> $GITHUB_OUTPUT | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
title: 公式サイトをリニューアルしました! | ||
date: 2025-01-27T00:30:00+09:00 | ||
description: この度、公式サイトを見やすくリニューアルしました! | ||
--- | ||
|
||
## Test |
This file contains 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