Skip to content

Commit de93171

Browse files
committed
add update_wiki workflow
1 parent 09714df commit de93171

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

.github/workflows/update_wiki.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Update wiki
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- "meme_generator_memes/**"
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: write
13+
14+
jobs:
15+
update-wiki:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Checkout wiki repo
21+
uses: actions/checkout@v4
22+
with:
23+
repository: ${{ github.repository }}.wiki
24+
path: wiki
25+
26+
- uses: dtolnay/rust-toolchain@1.83.0
27+
- uses: swatinem/rust-cache@v2
28+
29+
- name: Setup python
30+
uses: actions/setup-python@v5
31+
with:
32+
python-version: "3.10"
33+
34+
- name: Update memes.md
35+
run: |
36+
pip install virtualenv maturin[patchelf]
37+
virtualenv .venv
38+
maturin develop --release
39+
source .venv/bin/activate
40+
pip install filetype pillow
41+
export MEME_HOME=..
42+
python ../wiki/update_meme_list.py
43+
working-directory: meme_generator_py
44+
45+
- name: Commit & Push changes
46+
uses: actions-js/push@master
47+
with:
48+
directory: "wiki"
49+
repository: ${{ github.repository }}.wiki
50+
github_token: ${{ secrets.GITHUB_TOKEN }}
51+
message: "update meme list"
52+
branch: "master"

0 commit comments

Comments
 (0)