Merge pull request #4 from DDS-Derek/main

优化工作流 & 修复nginx站点目录错误和缓存权限问题
This commit is contained in:
jxxghp 2023-07-11 12:35:50 +08:00 committed by GitHub
commit ae41980b5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 6 deletions

View File

@ -11,6 +11,12 @@ jobs:
name: Checkout
uses: actions/checkout@master
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ secrets.DOCKER_USERNAME }}/moviepilot
-
name: Release version
id: release_version
@ -18,15 +24,16 @@ jobs:
app_version=$(cat version.py |sed -ne "s/APP_VERSION\s=\s'v\(.*\)'/\1/gp")
echo "app_version=$app_version" >> $GITHUB_ENV
-
name: Setup node
uses: actions/setup-node@v3
with:
node-version: '18'
-
name: Build frontend
id: build_brontend
run: |
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install -y nodejs yarn
node -v && yarn --version
git clone https://github.com/jxxghp/MoviePilot-Frontend
cd MoviePilot-Frontend
yarn && yarn build
@ -63,3 +70,4 @@ jobs:
tags: |
${{ secrets.DOCKER_USERNAME }}/moviepilot:latest
${{ secrets.DOCKER_USERNAME }}/moviepilot:${{ env.app_version }}
labels: ${{ steps.meta.outputs.labels }}

View File

@ -1,4 +1,4 @@
#user nobody;
user root;
worker_processes auto;
worker_cpu_affinity auto;
@ -25,6 +25,7 @@ http {
listen 3000;
server_name moviepilot;
root /app/public
location / {
# 主目录