-
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
1 parent
077b8ba
commit 20f6c40
Showing
2 changed files
with
88 additions
and
44 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,88 @@ | ||
name: 🚀 Deploy | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: {} | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
actions: write | ||
contents: read | ||
|
||
jobs: | ||
lint: | ||
name: ⬣ ESLint | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: ⬇️ Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: ▫️ Install pnpm | ||
uses: pnpm/[email protected] | ||
|
||
- name: ⎔ Setup node | ||
uses: actions/[email protected] | ||
with: | ||
node-version-file: .nvmrc | ||
cache: "pnpm" | ||
|
||
- name: 📥 Download deps | ||
shell: bash | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: 🔬 Lint | ||
run: pnpm run lint | ||
|
||
format: | ||
name: 🎨 Prettier | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: ⬇️ Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: ▫️ Install pnpm | ||
uses: pnpm/[email protected] | ||
|
||
- name: ⎔ Setup node | ||
uses: actions/[email protected] | ||
with: | ||
node-version-file: .nvmrc | ||
cache: "pnpm" | ||
|
||
- name: 📥 Download deps | ||
shell: bash | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: 🎨 Format | ||
run: pnpm run format | ||
|
||
deploy: | ||
name: 🚀 Deploy | ||
runs-on: ubuntu-22.04 | ||
needs: [lint, format] | ||
if: ${{ github.event_name == 'pull_request' }} | ||
|
||
steps: | ||
- name: ⬇️ Checkout repo | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: "50" | ||
|
||
- name: 👀 Read app name | ||
uses: SebRollen/[email protected] | ||
id: app_name | ||
with: | ||
file: "fly.toml" | ||
field: "app" | ||
|
||
- name: 🎈 Setup Fly | ||
uses: superfly/flyctl-actions/[email protected] | ||
|
||
- name: 🚀 Deploy preview environment | ||
run: flyctl deploy --remote-only | ||
env: | ||
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} |