forked from bepass-org/bepass-worker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
uoosef
committed
Sep 1, 2023
1 parent
300ee21
commit 322d16c
Showing
1 changed file
with
23 additions
and
6 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,34 @@ | ||
name: Deploy Worker | ||
on: | ||
push: | ||
pull_request: | ||
repository_dispatch: | ||
tags: | ||
- '*' | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
needs: test | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Build & Deploy Worker | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
with: | ||
ref: ${{ env.GIT_REF }} | ||
fetch-depth: 0 | ||
|
||
# npm (and node16) are installed by wrangler-action in a pre-job setup | ||
- name: Get dependencies | ||
run: npm i | ||
|
||
- name: 📚 Wrangler publish | ||
# github.com/cloudflare/wrangler-action | ||
uses: cloudflare/[email protected] | ||
with: | ||
apiToken: ${{ secrets.CF_API_TOKEN }} | ||
accountId: ${{ secrets.CF_ACCOUNT_ID }} | ||
# input overrides env-defaults, regardless | ||
environment: ${{ env.WORKERS_ENV }} | ||
env: | ||
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} | ||
GIT_COMMIT_ID: ${{ env.GIT_REF }} | ||
|
||
- name: Notice | ||
run: | | ||
echo "::notice::Deployed to ${WORKERS_ENV} / ${GIT_REF} @ ${COMMIT_SHA}" |