Skip to content

feat: 광고 구좌 구현 (#1505) #2335

feat: 광고 구좌 구현 (#1505)

feat: 광고 구좌 구현 (#1505) #2335

name: Development Deploy
on:
push:
branches:
- main
pull_request:
paths-ignore:
- '**.md'
- '.github/**/!(*.yml)'
- '.husky/**/*'
- '.vscode/**/*'
jobs:
build-app:
uses: ./.github/workflows/build.yml
with:
env: ${{ vars.DEVELOPMENT_ENV }}
deploy:
needs: build-app
runs-on: ubuntu-latest
name: Deploy to Cloudflare Pages
steps:
- name: Checkout Branch
uses: actions/checkout@v3
- name: Download Built App
uses: actions/download-artifact@v3
with:
name: built-app
path: out
- name: Publish
id: publish
run: |
set -o pipefail
yarn dlx wrangler pages publish "out" --project-name "${{ vars.CF_PAGES_NAME_DEVELOPMENT }}" --commit-message " " | tee deploy.log
echo "log<<EOF" >> $GITHUB_OUTPUT
echo "$(cat deploy.log)" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
- name: Get Preview URL
uses: actions-ecosystem/action-regex-match@v2
id: regex-match
with:
text: ${{ steps.publish.outputs.log }}
regex: '(https:\/\/[A-z0-9]+\.[^\.]+\.pages\.dev)'
- name: Find Comment
if: github.event_name == 'pull_request'
uses: peter-evans/find-comment@v2
id: find_comment
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: 프리뷰 배포 확인하기
- name: Create or update comment
if: github.event_name == 'pull_request'
uses: peter-evans/create-or-update-comment@v2
with:
comment-id: ${{ steps.find_comment.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
🚀 프리뷰 배포 확인하기 🚀
${{ steps.regex-match.outputs.group1 }}
edit-mode: replace