👷 #410
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
name: main | |
on: push | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
if: github.ref_type != 'tag' | |
outputs: | |
published_url: ${{ steps.deploy.outputs.url }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: oven-sh/setup-bun@v1 | |
- run: bun install --frozen-lockfile | |
- run: bunx vite build | |
working-directory: packages/app-builder | |
- name: Deploy | |
id: deploy | |
run: | | |
bunx wrangler pages deploy dist --project-name=timezone-rocks --branch=preview | tee deploy_log.txt | |
URL=`cat deploy_log.txt | grep -Eo "https://[^ ]*"` | |
echo url=$URL >> "$GITHUB_OUTPUT" | |
env: | |
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
- name: disclaim preview url in commit comment | |
uses: peter-evans/commit-comment@v3 | |
with: | |
body: | | |
[preview](${{ steps.deploy.outputs.url }}) | |
- run: bun type | |
- run: bun lint | |
- run: npm run test | |
e2e: | |
needs: [main] | |
uses: ./.github/workflows/_test-e2e.yml | |
with: | |
APP_URL: ${{ needs.main.outputs.published_url }} | |
secrets: inherit |