This repository has been archived by the owner on May 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
55 lines (44 loc) · 1.53 KB
/
push.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
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Publish Theme
on:
push:
branches:
- master
jobs:
build:
name: Publish Theme
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Checkout Website
uses: actions/checkout@v2
with:
repository: t1m0thyj/WDD-website
path: website
token: ${{ secrets.WDD_GITHUB_TOKEN }}
- name: Download MediaFire script
run: curl -LOJ https://raw.githubusercontent.com/TheAlienDrew/mediafire-direct/main/0-bash-scripts/mediafire-direct-dl.sh
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install Dependencies
run: pip install -r requirements.txt -r website/_src/requirements.txt
- id: prepublish
name: Prepublish Script
run: python main.py push
- if: ${{ steps.prepublish.outputs.changed }}
name: Rebuild Website
run: cp -R out/. website/themes && python website/_src/build.py theme-db.json
- if: ${{ steps.prepublish.outputs.changed }}
name: Commit Changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update theme database
file_pattern: theme-db.json
- if: ${{ steps.prepublish.outputs.changed }}
name: Publish Theme
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Publish new theme
repository: website