-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (42 loc) · 1.07 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Deploy
on:
push:
branches:
- main
tags:
- v*
workflow_dispatch:
env:
NODE_VERSION: ${{ vars.NODE_VERSION }}
jobs:
version:
uses: ./.github/workflows/version.yml
check:
uses: ./.github/workflows/check.yml
secrets: inherit
release:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
needs: check
steps:
- uses: softprops/action-gh-release@v1
permissions:
contents: write
deploy:
runs-on: ubuntu-latest
environment:
name: production
url: https://cashfolio.app
needs: [check, version]
steps:
- uses: actions/checkout@v4
- uses: superfly/flyctl-actions/setup-flyctl@master
with:
version: 0.1.117
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- run: npm version ${{ needs.version.outputs.version }} --git-tag-version false
- run: flyctl deploy --remote-only --image-label v${{ needs.version.outputs.version }}
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}