generated from unplugin/unplugin-starter
-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add deployment workflow and script
This commit introduces a new GitHub Actions workflow for deployment. It triggers on push to the main branch and on workflow dispatch. The workflow uses the setup-bun action with the latest bun version, installs dependencies with bun i --frozen-lockfile, and runs the newly added "deploy" script from package.json. The "deploy" script has also been added as a dependency in turbo.json. A CLOUDFLARE_API_TOKEN environment variable is used during deployment, which is fetched from GitHub secrets.
- Loading branch information
Showing
3 changed files
with
26 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: oven-sh/setup-bun@v1 | ||
with: | ||
bun-version: latest | ||
- run: bun i --frozen-lockfile | ||
- run: bun run deploy | ||
env: | ||
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }} |
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
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 |
---|---|---|
|
@@ -16,6 +16,9 @@ | |
"dev": { | ||
"persistent": true, | ||
"cache": false | ||
}, | ||
"deploy": { | ||
"dependsOn": ["^deploy"] | ||
} | ||
} | ||
} |