-
Notifications
You must be signed in to change notification settings - Fork 18
50 lines (48 loc) · 1.65 KB
/
deploy.yml
File metadata and controls
50 lines (48 loc) · 1.65 KB
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
45
46
47
48
49
50
name: Deploy
on:
workflow_run:
workflows: [Testing]
types: [completed]
branches: [main]
jobs:
deploy:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
runs-on: ubuntu-24.04
environment: production
env:
INSTANT_APP_ID: ${{ vars.INSTANT_APP_ID }}
MAPTILER_API_KEY: ${{ vars.MAPTILER_API_KEY }}
MAPTILER_MAP_STYLE_LIGHT: ${{ vars.MAPTILER_MAP_STYLE_LIGHT }}
MAPTILER_MAP_STYLE_DARK: ${{ vars.MAPTILER_MAP_STYLE_DARK }}
SENTRY_DSN: ${{ vars.SENTRY_DSN }}
SENTRY_ENABLED: ${{ vars.SENTRY_ENABLED }}
SENTRY_RELEASE: ${{ github.sha }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4.0.0
- name: Use Node.js 24
uses: actions/setup-node@v4
with:
node-version: 24
cache: 'pnpm'
# TODO: Use the artifact from the Testing workflow... seems quite complicated for now
# https://stackoverflow.com/questions/67973057/github-actions-workflow-run-outputs
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm build
- name: Upload dist folder
uses: up9cloud/action-rsync@v1.4
env:
HOST: ${{ vars.DEPLOY_HOST }}
KEY: ${{ secrets.DEPLOY_SSH_KEY }}
TARGET: ${{ vars.DEPLOY_TARGET }}
SOURCE: './dist/'
MODE: push
VERBOSE: true
PORT: ${{ vars.DEPLOY_PORT }}
USER: ${{ vars.DEPLOY_USER }}
ARGS: -avz --exclude-from=.gitignore --exclude=/.git/ --exclude=/.github/ --delay-updates