40 lines
842 B
YAML
40 lines
842 B
YAML
name: Build and Deploy
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'master'
|
|
- 'main'
|
|
pull_request:
|
|
branches:
|
|
- 'master'
|
|
- 'main'
|
|
|
|
env:
|
|
NGINX_STATIC: ${{ vars.NGINX_STATIC }}
|
|
|
|
jobs:
|
|
build:
|
|
name: Build and Deploy
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
options: --volume "${NGINX_STATIC}:/usr/share/nginx/static:rw"
|
|
steps:
|
|
-
|
|
name: Echo NGINX_STATIC
|
|
run: echo ${NGINX_STATIC}
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@v4
|
|
-
|
|
name: Setup pnpm
|
|
uses: pnpm/action-setup@v4.0.0
|
|
-
|
|
name: Install dependencies
|
|
run: pnpm install
|
|
-
|
|
name: Compile CSS
|
|
run: pnpm run build
|
|
-
|
|
name: Copy files to public folder
|
|
run: mkdir /usr/share/nginx/static/fpv; cp -rf public/* /usr/share/nginx/static/fpv
|