-
Notifications
You must be signed in to change notification settings - Fork 2
78 lines (63 loc) · 2.19 KB
/
deploy-archive.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Generates podcasts for Archive.org uploads
on:
workflow_dispatch:
push:
branches: [ master ]
paths-ignore:
- '**/.gitignore'
- '**/*.md'
- LICENSE
- site/*
- vscode/*
pull_request:
branches: [ master ]
schedule:
- cron: "0 0 * * 1" #runs at 00:00 on Monday
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
build:
if: "!contains(github.event.head_commit.message, 'AUTO')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Fetch full Git history (not shallow)
run: |
git fetch --unshallow
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Create podcasts
run: |
python radio2podcasts/__main__.py --input=podcasts-archive.org.json --output=index-archive.html
if [[ -z $(git status -s) ]]
then
echo "Nothing to commit."
else
echo "---------------------------------"
ls
echo "---------------------------------"
git config user.name "catus felis"
git config user.email catusf@users.noreply.github.com
git branch --show-current
git add site
git status
git commit -m "AUTO - Update website"
git fetch
git push origin --force
fi
- name: Deploy site to GitHub Pages 🚀
uses: JamesIves/github-pages-deploy-action@3.6.2
with:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: site # The folder the action should deploy.
CLEAN: true # Automatically remove deleted files from the deploy branch