-
Notifications
You must be signed in to change notification settings - Fork 61
52 lines (50 loc) · 1.44 KB
/
generate.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
on:
push:
branches:
- master
workflow_dispatch:
name: Generate themes site
jobs:
generate:
name: Generate the static themes site
runs-on: ubuntu-latest
steps:
- name: Checkout latest
uses: actions/checkout@master
with:
submodules: "recursive"
- name: Setup Python 3
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install Python requirements
run: pip install -r requirements.txt
- name: Run the generator script
run: python generate_docs.py site
- uses: actions/upload-artifact@v4
with:
name: themes-directory
path: site/*
- name: Checkout zola repo
uses: actions/checkout@v2
with:
repository: 'getzola/zola'
path: 'zola'
token: ${{ secrets.TOKEN }}
- name: Copy updated themes site
run: |
cp -r site/* zola/docs/content/themes/
- name: Commit files
run: |
cd zola
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add docs/content/themes
git commit -m "Update themes gallery" -a
- name: Create pull request
uses: peter-evans/create-pull-request@v3
with:
title: 'Update themes gallery'
path: 'zola'
token: ${{ secrets.TOKEN }}
branch-suffix: 'timestamp'