Skip to content

Commit

Permalink
👷
Browse files Browse the repository at this point in the history
  • Loading branch information
Platane committed Mar 17, 2024
1 parent 385c071 commit 51b6ada
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/_test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,4 @@ jobs:
echo url=$URL >> "$GITHUB_OUTPUT"
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_PUBLISH_TOKEN }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
22 changes: 11 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
if: github.ref_type != 'tag'
outputs:
published_url: ${{ steps.publish.outputs.url }}
published_url: ${{ steps.deploy.outputs.url }}
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
Expand All @@ -17,21 +17,21 @@ jobs:
- run: bunx vite build
working-directory: packages/app-builder

- name: Publish
id: publish
uses: cloudflare/pages-action@1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: timezone-rocks
directory: dist
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
- 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.publish.outputs.url }})
[preview](${{ steps.deploy.outputs.url }})
- run: bun type
- run: bun lint
Expand Down

1 comment on commit 51b6ada

@github-actions
Copy link

Choose a reason for hiding this comment

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

Please sign in to comment.