forked from PhotonVision/photonvision
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (45 loc) · 1.19 KB
/
website.yml
File metadata and controls
48 lines (45 loc) · 1.19 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
name: Website
on:
push:
# For now, run on all commits to main
branches: [ main ]
tags:
- 'v*'
pull_request:
branches: [ main ]
merge_group:
jobs:
rsync:
name: Build and Sync Files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
- name: Install packages
run: npm ci
working-directory: website
- name: Build project
run: npm run build
working-directory: website
- uses: up9cloud/action-rsync@v1.4
if: github.ref == 'refs/heads/main'
env:
HOST: ${{ secrets.WEBMASTER_SSH_HOST }}
USER: ${{ secrets.WEBMASTER_SSH_USERNAME }}
KEY: ${{secrets.WEBMASTER_SSH_KEY}}
SOURCE: website/dist/*
TARGET: /var/www/html/photonvision-website
format-check:
name: Check Formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
- name: Install Packages
run: npm ci
working-directory: website
- name: Run Formatting Check
run: npx prettier -c .
working-directory: website