-
Notifications
You must be signed in to change notification settings - Fork 8
77 lines (72 loc) · 2.25 KB
/
Copy pathbuild.yml
File metadata and controls
77 lines (72 loc) · 2.25 KB
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
name: Build Jekyll site
on:
push:
branches: ["main"]
pull_request:
schedule:
- cron: "27 0 * * 1,4"
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set Python
uses: actions/setup-python@v6
with:
python-version: '3.13'
- run: pip install pyyaml feedparser
- name: Update funding opportunities
run: python .github/rss_2_yaml.py
- name: Build
uses: actions/jekyll-build-pages@v1
# The next step uploads a "special" artifact used by the
# `actions/deploy-pages` below to deploy the website.
- name: Upload github-pages artifact
uses: actions/upload-pages-artifact@v5
# We also want to upload an artifact that can be viewed locally without
# messing up what the `actions/deploy-pages` workflow expects. To do this,
# we need first to rename the `_site` directory
- name: Copy _site to open-source subdirectory
run: |
mkdir preview
cp -r _site preview/open-source
- name: Upload preview
uses: actions/upload-artifact@v7
with:
name: Preview
path: preview
retention-days: 5
deploy:
runs-on: ubuntu-latest
if: github.event_name == 'push'
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
link-checker:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v6
- uses: actions/download-artifact@v8
with:
name: Preview
- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@8646ba30535128ac92d33dfc9133794bfdd9b411 # v2.8.0
with:
# nice to check a few specific root-level markdown files (README.md etc) for valid links,
# but the main thing to check is the rendered website (in the `open-source` directory)
args: "--github-token ${{ secrets.GITHUB_TOKEN }} -- README.md CONTRIBUTING.md open-source/"
fail: true
jobSummary: true