-
Notifications
You must be signed in to change notification settings - Fork 53
42 lines (36 loc) · 1.16 KB
/
pr_to_master_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
# Automatically deploy the latest changes of a branch to the FTP server.
on:
# Triggers the workflow on PRs in "master"
pull_request:
branches: [ "master" ]
# Allows this workflow to be run manually from the Actions tab.
workflow_dispatch:
name: 🚀 PR Auto-Deploy
jobs:
web-deploy:
name: 🎉 Deploy
runs-on: ubuntu-latest
steps:
- name: 🚚 Get latest code
uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-node@master
with:
node-version: 20.x
- name: 📥 Install project dependencies
run: npm install
- name: ⚒️ Build the project
env:
NODE_OPTIONS: "--max_old_space_size=4096"
VRCA_HOSTED_URL: "https://app.vircadia.com/staging/${{ github.head_ref }}/"
run: npm run build
- name: 📂 Sync files
uses: SamKirkland/FTP-Deploy-Action@4.3.3
with:
server: ftp.vircadia.com
username: ${{ secrets.ftp_username }}
password: ${{ secrets.ftp_password }}
local-dir: dist/spa/
server-dir: /staging/${{ github.head_ref }}/
dry-run: false