-
-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (70 loc) · 2.43 KB
/
export-mastodon-list.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
79
80
81
82
83
84
85
86
name: "💾 Export Geotribu Mastodon accounts and lists"
on:
pull_request:
branches:
- main
push:
branches:
- main
schedule:
- cron: "0 5 * * SUN" # weekly on sundays
workflow_dispatch: # to trigger manually
env:
LANG: "fr_FR.UTF-8"
LC_ALL: "fr_FR.UTF-8"
LC_TIME: "fr_FR.UTF-8"
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
id-token: write
pages: write
jobs:
run:
name: Export des données du compte Geotribu sur Github Pages
runs-on: ubuntu-latest
if: github.repository == 'geotribu/geo-mastodon-comptes-listes'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Get source code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/[email protected]
with:
cache: "pip"
cache-dependency-path: "requirements.txt"
python-version: 3.12
- name: Install dependencies
# TODO: extra for mastodon only
run: |
python -m pip install -U pip setuptools wheel
python -m pip install -U -r requirements.txt
- name: Export geotribu's mastodon lists and accounts
env:
GEOTRIBU_MASTODON_API_ACCESS_TOKEN: ${{ secrets.GEOTRIBU_MASTODON_API_ACCESS_TOKEN }}
run: |
geotribu social mastodon-export -w export/
- name: Save build doc as artifact
uses: actions/upload-artifact@v4
with:
name: export-mastodon
path: export/
if-no-files-found: error
retention-days: 1
- name: Setup Pages
uses: actions/configure-pages@v5
if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main')
- name: Generate Directory Listings
uses: jayanta525/[email protected]
with:
FOLDER: mastodon/export-mastodon/
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main')
with:
path: mastodon/export-mastodon/
- name: Deploy to GitHub Pages
id: deployment
if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main')
uses: actions/deploy-pages@v4