Skip to content

Commit 2fed46a

Browse files
committed
update deploy* with composite action
1 parent 97ee42c commit 2fed46a

File tree

2 files changed

+13
-32
lines changed

2 files changed

+13
-32
lines changed

.github/workflows/deploy-beta.yml

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,7 @@ jobs:
2222
with:
2323
fetch-depth: 2 # So sentry can get the previous commit
2424

25-
- uses: pnpm/action-setup@v4
26-
27-
- name: Setup Node
28-
uses: actions/setup-node@v6
29-
with:
30-
node-version-file: '.nvmrc'
31-
cache: pnpm
25+
- uses: ./.github/actions/setup-pnpm
3226

3327
- name: Install SSH key
3428
uses: benoitchantre/[email protected]
@@ -37,11 +31,11 @@ jobs:
3731
private-key-name: dim.rsa
3832
known-hosts: ${{ secrets.REMOTE_HOST }}
3933

40-
- name: get-npm-version
34+
- name: Get package version
4135
id: package-version
4236
uses: martinbeentjes/[email protected]
4337

44-
- name: set beta
38+
- name: Set beta environment
4539
run: |
4640
echo "build_level='beta'" >> $GITHUB_ENV
4741
@@ -51,9 +45,6 @@ jobs:
5145
run: |
5246
echo "VERSION=${{ steps.package-version.outputs.current-version }}.$(($RUN_NUM))" >> $GITHUB_ENV
5347
54-
- name: Install
55-
run: pnpm install --frozen-lockfile --prefer-offline
56-
5748
- name: Build
5849
run: pnpm build:beta
5950
env:
@@ -63,8 +54,7 @@ jobs:
6354
WEB_OAUTH_CLIENT_SECRET: ${{ secrets.OAUTH_SECRET }}
6455
DIM_API_KEY: ${{ secrets.DIM_API_KEY }}
6556

66-
# Send webpack stats and build information to RelativeCI
67-
- name: Send bundle stats and build information to RelativeCI
57+
- name: Send bundle stats to RelativeCI
6858
uses: relative-ci/[email protected]
6959
with:
7060
key: ${{ secrets.RELATIVE_CI_KEY }}
@@ -74,14 +64,14 @@ jobs:
7464
- name: Check Syntax
7565
run: pnpm syntax
7666

77-
- name: Rsync to Server
67+
- name: Deploy to server
7868
run: ./build/rsync-deploy.sh
7969
env:
80-
SSH_PRIVATE_KEY: ${{ secrets.SSH_KEY }}
81-
SOURCE: "dist/"
82-
REMOTE_USER: ${{ secrets.REMOTE_USER }}
83-
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
84-
REMOTE_PATH: beta.destinyitemmanager.com
70+
SSH_PRIVATE_KEY: ${{ secrets.SSH_KEY }}
71+
SOURCE: "dist/"
72+
REMOTE_USER: ${{ secrets.REMOTE_USER }}
73+
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
74+
REMOTE_PATH: beta.destinyitemmanager.com
8575

8676
- name: Purge CloudFlare cache
8777
run: ./build/purge-cloudflare.sh

.github/workflows/deploy-prod.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
schedule:
1212
# Deploy at 5pm Sunday PST, which is 1am Monday UTC
1313
# * is a special character in YAML so you have to quote this string
14-
- cron: '0 1 * * 1'
14+
- cron: '0 1 * * 1'
1515

1616
jobs:
1717
deploy:
@@ -26,13 +26,7 @@ jobs:
2626
# Use the dim-release-bot token rather than the default
2727
token: ${{ secrets.GH_TOKEN }}
2828

29-
- uses: pnpm/action-setup@v4
30-
31-
- name: Setup Node
32-
uses: actions/setup-node@v6
33-
with:
34-
node-version-file: '.nvmrc'
35-
cache: pnpm
29+
- uses: ./.github/actions/setup-pnpm
3630

3731
- name: Install SSH key
3832
uses: benoitchantre/[email protected]
@@ -41,9 +35,6 @@ jobs:
4135
private-key-name: dim.rsa
4236
known-hosts: ${{ secrets.REMOTE_HOST }}
4337

44-
- name: Install
45-
run: pnpm install --frozen-lockfile --prefer-offline
46-
4738
- name: Build and deploy
4839
run: ./build/deploy-prod.sh
4940
env:
@@ -67,7 +58,7 @@ jobs:
6758
CLOUDFLARE_EMAIL: ${{ secrets.CLOUDFLARE_EMAIL }}
6859
APP_DOMAIN: app.destinyitemmanager.com
6960

70-
- name: get-npm-version
61+
- name: Get package version
7162
id: package-version
7263
shell: bash
7364
run: |

0 commit comments

Comments
 (0)