Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add: preview_pages用のWorkflowを追加 #2342

Merged
merged 8 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/trigger_preview.yml
sevenc-nanashi marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: "Trigger Preview Update"
sevenc-nanashi marked this conversation as resolved.
Show resolved Hide resolved

on:
pull_request_target:
types:
- opened
- synchronize
- closed
- reopened
push:
branches:
- main
- project-*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(ただのコメントです)

これ今思いついたんですが、将来的にTAGごとにプレビューページデプロイできると便利かもですね!!
過去バージョンのビルドが確認できそう。


jobs:
trigger:
runs-on: ubuntu-latest
steps:
- name: Trigger Bot
sevenc-nanashi marked this conversation as resolved.
Show resolved Hide resolved
run: |
gh workflow run -R voicevox/preview-pages update_pages.yml
env:
GH_TOKEN: ${{ secrets.PREVIEW_UPDATE_TOKEN }}
sevenc-nanashi marked this conversation as resolved.
Show resolved Hide resolved
34 changes: 34 additions & 0 deletions .github/workflows/update_preview.yml
sevenc-nanashi marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "Build Preview"
on:
sevenc-nanashi marked this conversation as resolved.
Show resolved Hide resolved
push:
branches:
- main
- project-*
pull_request:

jobs:
update_pages:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup environment
uses: ./.github/actions/setup-environment

- name: Build
run: |
npm run storybook:build -- --preview-url ./
npm run browser:build -- --base ./

mkdir dist_preview
mkdir dist_preview/editor
mkdir dist_preview/storybook
cp -r dist/* dist_preview/editor/
cp -r storybook-static/* dist_preview/storybook/
sevenc-nanashi marked this conversation as resolved.
Show resolved Hide resolved

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: preview-page
sevenc-nanashi marked this conversation as resolved.
Show resolved Hide resolved
path: dist
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,6 @@ electron-builder.yml

# Storybook
storybook-static/

# Preview Build Output
dist_preview/
Loading