Push web demo to cloudflare in nightly workflow (#3)

Reviewed-on: #3
This commit is contained in:
2024-07-17 19:06:52 +09:30
parent dafece8585
commit 1654824839
3 changed files with 80 additions and 2 deletions

View File

@@ -5,17 +5,49 @@ on:
branches: [main]
jobs:
release-macos:
macos:
runs-on: macos-arm64
steps:
- uses: actions/checkout@v4
- name: Install NPM Packages
run: bun install
- name: Run tests
run: ng test --no-watch --no-progress --browsers=ChromeHeadless
- name: Build MacOS
run: bunx tauri build && echo 0
- uses: actions/upload-artifact@v3
with:
name: BufPiv_main
path: src-tauri/target/release/bundle/macos/
web-demo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- uses: browser-actions/setup-chrome@v1
id: setup-chrome
with:
install-dependencies: true
- name: Set Chrome binary variable
run: echo "CHROME_BIN=${{ steps.setup-chrome.outputs.chrome-path }}" > "$GITHUB_ENV"
- name: Install NPM Packages
run: bun install
- name: Run tests
run: bunx ng test --no-watch --no-progress --browsers=ChromeHeadlessNoSandbox
- name: Build Web Dist
run: bun run build
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: buf
directory: dist/proto-creator/browser