Skip to content

Commit 4d54344

Browse files
committed
[admin] Start curing bitrot of CI
1 parent 239c2d6 commit 4d54344

File tree

1 file changed

+66
-48
lines changed

1 file changed

+66
-48
lines changed

.github/workflows/pelican.yml

Lines changed: 66 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
## the contents of this file were based on the existing deployment templates in
1+
## Workflow for building the site and (optionally) publishing it to GitHub
2+
## Pages.
3+
## The contents of this file were based on the existing deployment templates in
24
## https://github.com/actions/starter-workflows/tree/main/pages
5+
## as well as the official Pelican docs at
6+
## https://github.com/getpelican/pelican/blob/main/.github/workflows/github_pages.yml
37

48
name: Deploy Pelican site to GH Pages
59

@@ -9,57 +13,71 @@ on:
913

1014
workflow_dispatch:
1115

12-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13-
permissions:
14-
contents: read
15-
pages: write
16-
id-token: write
16+
17+
jobs:
18+
deploy:
19+
uses: "getpelican/pelican/.github/workflows/github_pages.yml@main"
20+
defaults:
21+
run:
22+
shell: bash
23+
working-directory: "./src"
24+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
25+
permissions:
26+
contents: read
27+
pages: write
28+
id-token: write
29+
with:
30+
settings: "publishconf.py"
31+
python: "3.9"
32+
# FIXME: remove when workflow is no longer bitrotted
33+
deploy: false
34+
1735

1836
# Allow one concurrent deployment
1937
concurrency:
2038
group: "pages"
2139
cancel-in-progress: true
2240

23-
defaults:
24-
run:
25-
shell: bash
26-
27-
jobs:
28-
build:
29-
runs-on: ubuntu-latest
30-
31-
steps:
32-
- name: Checkout source
33-
uses: actions/checkout@v3
34-
35-
- name: Setup Python
36-
uses: actions/setup-python@v4
37-
with:
38-
python-version: "3.9"
39-
cache: 'pip'
40-
41-
- name: Install Pelican
42-
run: pip install pelican markdown
43-
44-
- name: Build site using Pelican
45-
run: |
46-
cd src
47-
pelican content -s publishconf.py
48-
cd ..
49-
50-
- name: Upload site
51-
uses: actions/upload-pages-artifact@v1
52-
with:
53-
path: ./src/output
54-
55-
deploy:
56-
environment:
57-
name: github-pages
58-
url: ${{ steps.deployment.outputs.page_url }}
59-
runs-on: ubuntu-latest
60-
needs: build
61-
steps:
62-
- name: Deploy to GH Pages
63-
id: deployment
64-
uses: actions/deploy-pages@v1
41+
### defaults:
42+
### run:
43+
### shell: bash
44+
###
45+
### jobs:
46+
### build:
47+
### runs-on: ubuntu-latest
48+
###
49+
### steps:
50+
### - name: Checkout source
51+
### uses: actions/checkout@v3
52+
###
53+
### - name: Setup Python
54+
### uses: actions/setup-python@v4
55+
### with:
56+
### python-version: "3.9"
57+
### cache: 'pip'
58+
###
59+
### - name: Install Pelican
60+
### run: pip install pelican markdown
61+
###
62+
### - name: Build site using Pelican
63+
### run: |
64+
### cd src
65+
### pelican content -s publishconf.py
66+
### cd ..
67+
###
68+
### - name: Upload site
69+
### uses: actions/upload-pages-artifact@v1
70+
### with:
71+
### path: ./src/output
72+
###
73+
### deploy:
74+
### environment:
75+
### name: github-pages
76+
### url: ${{ steps.deployment.outputs.page_url }}
77+
### runs-on: ubuntu-latest
78+
### needs: build
79+
### steps:
80+
### - name: Deploy to GH Pages
81+
### id: deployment
82+
### uses: actions/deploy-pages@v1
6583

0 commit comments

Comments
 (0)