-
Notifications
You must be signed in to change notification settings - Fork 104
72 lines (62 loc) · 2.45 KB
/
deploy.yml
File metadata and controls
72 lines (62 loc) · 2.45 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Deploy
on:
workflow_dispatch:
push:
branches:
- main
jobs:
deploy:
name: LP Wikis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 2
- id: lua-changed-files
uses: tj-actions/changed-files@v47
with:
files: |
lua/wikis/**/*.lua
- id: res-changed-files
uses: tj-actions/changed-files@v47
with:
files: |
stylesheets/**/*.scss
javascript/**/*.js
- name: Setup Python
if: steps.res-changed-files.outputs.any_changed == 'true' || steps.lua-changed-files.outputs.any_changed == 'true'
uses: actions/setup-python@v6
with:
python-version: '3.14'
- name: Install Python Dependency
if: steps.res-changed-files.outputs.any_changed == 'true' || steps.lua-changed-files.outputs.any_changed == 'true'
run: pip install requests
- name: Resource Deploy
if: steps.res-changed-files.outputs.any_changed == 'true'
env:
WIKI_USER: ${{ secrets.LP_BOTUSER }}
WIKI_PASSWORD: ${{ secrets.LP_BOTPASSWORD }}
WIKI_UA_EMAIL: ${{ secrets.LP_UA_EMAIL }}
WIKI_BASE_URL: ${{ secrets.LP_BASE_URL }}
DEPLOY_TRIGGER: ${{ github.event_name }}
PYTHONUNBUFFERED: 1
run: python3 ./scripts/deploy_res.py ${{ steps.res-changed-files.outputs.all_changed_files }}
- name: Lua Deploy
if: steps.lua-changed-files.outputs.any_changed == 'true'
env:
WIKI_USER: ${{ secrets.LP_BOTUSER }}
WIKI_PASSWORD: ${{ secrets.LP_BOTPASSWORD }}
WIKI_UA_EMAIL: ${{ secrets.LP_UA_EMAIL }}
WIKI_BASE_URL: ${{ secrets.LP_BASE_URL }}
DEPLOY_TRIGGER: ${{ github.event_name }}
PYTHONUNBUFFERED: 1
run: python3 ./scripts/deploy.py ${{ steps.lua-changed-files.outputs.all_changed_files }}
- name: Lua Protect
if: steps.lua-changed-files.outputs.added_files_count != 0 || steps.lua-changed-files.outputs.renamed_files_count != 0
env:
WIKI_USER: ${{ secrets.LP_BOTUSER }}
WIKI_PASSWORD: ${{ secrets.LP_BOTPASSWORD }}
WIKI_UA_EMAIL: ${{ secrets.LP_UA_EMAIL }}
WIKI_BASE_URL: ${{ secrets.LP_BASE_URL }}
PYTHONUNBUFFERED: 1
run: python3 ./scripts/protect.py ${{ steps.lua-changed-files.outputs.added_files }} ${{ steps.lua-changed-files.outputs.renamed_files }}