forked from ProbiusOfficial/Hello-CTF
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (42 loc) · 1.18 KB
/
ghdeploy.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
name: Deploy to Github Pages and Automatically update
on:
push:
branches:
- master
- main
schedule:
- cron: "0 */6 * * *"
repository_dispatch:
types: [Hello-CTFTime]
permissions:
contents: write
jobs:
deploy_and_update:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install libxml2 and libxslt
run: sudo apt-get install -y libxml2-dev libxslt-dev
- name: Install dependencies
run: pip install -r requirements.txt
- name: pre_build
run: python build.py
- name: Deploy MkDocs
run: mkdocs gh-deploy --force
- name: Check for changes
id: check_changes
run: |
git add docs/Archive/friends.md
if [ -n "$(git status --porcelain)" ]; then
echo "CHANGES=true" >> $GITHUB_ENV
fi
- name: Commit and push changes
if: env.CHANGES == 'true'
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Automatically update