File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222 working-directory : remix
2323 - run : npm run icons
2424 - run : npm run test
25-
26- deploy-preview :
27- if : github.ref != 'refs/heads/master'
28- env :
29- FIREBASE_SERVICE_ACCOUNT_KEY : " ${{ secrets.FIREBASE_SERVICE_ACCOUNT_FLIGHTPLOT_WEB }}"
30- SESSION_SECRET : ${{ secrets.SESSION_SECRET }}
31- DEPLOYMENT_NAME : ${{ github.ref_name }}
32- name : Deploy preview environment
33- runs-on : ubuntu-latest
34- steps :
35- - uses : actions/checkout@v2
36- - name : install myke
37- run : |
38- wget -qO /usr/local/bin/myke https://github.com/omio-labs/myke/releases/download/v1.0.2/myke_linux_amd64
39- chmod +x /usr/local/bin/myke
40- myke --version
41- - uses : superfly/flyctl-actions/setup-flyctl@master
42- - run : myke deploy-preview
Original file line number Diff line number Diff line change 1+ name : Pull Request Closed
2+
13on :
2- - delete
4+ pull_request_target :
5+ types :
6+ - closed
37
48defaults :
59 run :
610 working-directory : remix
711
812jobs :
913 delete-preview :
10- if : github.event.ref_type == 'branch'
1114 env :
1215 FLY_API_TOKEN : ${{ secrets.FLY_API_TOKEN }}
13- DEPLOYMENT_NAME : ${{ github.event.ref }}
16+ DEPLOYMENT_NAME : ${{ github.head_ref }}
1417 name : Delete preview environment
1518 runs-on : ubuntu-latest
1619 steps :
Original file line number Diff line number Diff line change 1+ name : Pull Request (Re-)Opened & Updated
2+
3+ on :
4+ pull_request_target :
5+
6+ defaults :
7+ run :
8+ working-directory : remix
9+
10+ env :
11+ FLY_API_TOKEN : ${{ secrets.FLY_API_TOKEN }}
12+
13+ jobs :
14+ deploy-preview :
15+ runs-on : ubuntu-latest
16+ permissions :
17+ pull-requests : write
18+ env :
19+ FIREBASE_SERVICE_ACCOUNT_KEY : " ${{ secrets.FIREBASE_SERVICE_ACCOUNT_FLIGHTPLOT_WEB }}"
20+ SESSION_SECRET : ${{ secrets.SESSION_SECRET }}
21+ DEPLOYMENT_NAME : ${{ github.head_ref }}
22+ name : Deploy preview environment
23+ steps :
24+ - uses : actions/checkout@v2
25+ with :
26+ ref : ${{ github.event.pull_request.head.sha }}
27+ - name : install myke
28+ run : |
29+ wget -qO /usr/local/bin/myke https://github.com/omio-labs/myke/releases/download/v1.0.2/myke_linux_amd64
30+ chmod +x /usr/local/bin/myke
31+ myke --version
32+ - uses : superfly/flyctl-actions/setup-flyctl@master
33+ - run : myke deploy-preview
34+ - uses : mshick/add-pr-comment@v2
35+ with :
36+ message : |
37+ ✅ Preview environment deployed at https://flightplot-preview-${{ github.head_ref }}.fly.dev/
38+ message-failure : |
39+ ❌ Preview environment deployment failed.
You can’t perform that action at this time.
0 commit comments