-
Notifications
You must be signed in to change notification settings - Fork 46
65 lines (61 loc) · 2.04 KB
/
Generate GitHub Pages.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
56
57
58
59
60
61
62
63
64
name: Generate GitHub Pages
on:
push:
branches:
- master
- gh-pages
paths:
- '.github/workflows/Generate GitHub Pages.yml'
- 'gfx/interface/texticons/**/*.dds'
- 'gfx/interface/texticons/**/*.tga'
- 'gfx/interface/event_pictures/**/*.dds'
- 'gfx/interface/event_pictures/**/*.tga'
- 'gfx/interface/decisions/**/*.dds'
- 'gfx/interface/decisions/**/*.tga'
- 'gfx/interface/goals/**/*.dds'
- 'gfx/interface/ideas/**/*.dds'
- 'gfx/interface/goals/**/*.tga'
- 'gfx/interface/ideas/**/*.tga'
- 'interface/**/*.gfx'
concurrency:
group: generate_pages
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.GHPAGES_PUSH_TOKEN }}
ref: master
- name: Checkout gh-pages branch
uses: actions/checkout@v2
with:
token: ${{ secrets.GHPAGES_PUSH_TOKEN }}
ref: gh-pages
path: gh-pages
- name: Generate webpage
uses: Yard1/hoi4-icon-search-action@master
with:
goals: './interface/eaw_goals.gfx ./interface/ee2_goals.gfx ./interface/ee2_goals.gfx ./interface/ncr_goals.gfx'
ideas: './interface/eaw_ideas.gfx ./interface/ee2_ideas.gfx'
texticons: './interface/etat_texticons.gfx ./interface/eaw_texticons.gfx'
events: './interface/eaw_eventpictures.gfx'
decisions: './interface/eaw_decisions.gfx'
favicon: './eaw_icon.png'
title: 'Equestria at War GFX Search'
modPath: 'gh-pages'
- name: Commit and push files
run: |
cd $GITHUB_WORKSPACE/gh-pages
if [ -z "$(git status --porcelain)" ]; then
exit 0
fi
PYDATE=$(python -c "import datetime; print(datetime.datetime.utcnow())")
sed -i "s/@UPDATE_DATE/${PYDATE}/g" index.html
git config --global user.email "[email protected]"
git config --global user.name "Yard1"
git pull --no-rebase
git pull --no-rebase
git add -A
git commit -m "Update webpage (automatic)"
git push