Skip to content

Commit eca5612

Browse files
authored
Merge pull request #30 from geotribu/ci/split-into-two-jobs-to-avoid-PR-errors
CI: split into two jobs to avoid PR errors
2 parents 700a3cb + f6d6a95 commit eca5612

File tree

2 files changed

+28
-23
lines changed

2 files changed

+28
-23
lines changed

.github/workflows/export-mastodon-list.yml

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ on:
88
branches:
99
- main
1010
schedule:
11-
- cron: "0 5 * * SUN" # weekly on sundays
12-
workflow_dispatch: # to trigger manually
11+
- cron: "0 5 * * SUN" # weekly on sundays
12+
workflow_dispatch: # to trigger manually
1313

1414
env:
1515
LANG: "fr_FR.UTF-8"
@@ -22,21 +22,16 @@ permissions:
2222
id-token: write
2323
pages: write
2424

25-
2625
jobs:
27-
28-
run:
29-
name: Export des données du compte Geotribu sur Github Pages
26+
export:
27+
name: 📑 Export data
3028
runs-on: ubuntu-latest
3129
if: github.repository == 'geotribu/geo-mastodon-comptes-listes'
32-
environment:
33-
name: github-pages
34-
url: ${{ steps.deployment.outputs.page_url }}
3530

3631
steps:
3732
- name: Get source code
3833
uses: actions/checkout@v6
39-
34+
4035
- name: Set up Python
4136
uses: actions/[email protected]
4237
with:
@@ -45,7 +40,6 @@ jobs:
4540
python-version: 3.12
4641

4742
- name: Install dependencies
48-
# TODO: extra for mastodon only
4943
run: |
5044
python -m pip install -U pip setuptools wheel
5145
python -m pip install -U -r requirements.txt
@@ -56,31 +50,42 @@ jobs:
5650
run: |
5751
geotribu social mastodon-export -w export/
5852
53+
- name: Generate Directory Listings
54+
uses: jayanta525/[email protected]
55+
with:
56+
FOLDER: export/
57+
5958
- name: Save build doc as artifact
6059
uses: actions/upload-artifact@v5
6160
with:
6261
name: export-mastodon
6362
path: export/
6463
if-no-files-found: error
65-
retention-days: 1
64+
retention-days: 15
6665

67-
- name: Setup Pages
68-
uses: actions/configure-pages@v5
69-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
66+
deploy:
67+
name: 📤 Deploy to GitHub Pages
68+
needs: export
69+
runs-on: ubuntu-latest
70+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
71+
environment:
72+
name: github-pages
73+
url: ${{ steps.deployment.outputs.page_url }}
7074

71-
- name: Generate Directory Listings
72-
uses: jayanta525/[email protected]
75+
steps:
76+
- name: Download artifact
77+
uses: actions/download-artifact@v5
7378
with:
74-
FOLDER: export/
79+
name: export-mastodon
80+
path: export/
81+
- name: Setup Pages
82+
uses: actions/configure-pages@v5
7583

7684
- name: Upload artifact
7785
uses: actions/upload-pages-artifact@v4
78-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
7986
with:
8087
path: export/
81-
88+
8289
- name: Deploy to GitHub Pages
8390
id: deployment
84-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
8591
uses: actions/deploy-pages@v4
86-

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
geotribu>=0.32,<1
1+
geotribu>=0.35.1,<1

0 commit comments

Comments
 (0)