Skip to content

Commit

Permalink
Move website build to a composite action (so it can be reused)
Browse files Browse the repository at this point in the history
  • Loading branch information
swt2c committed Feb 6, 2025
1 parent 41e5659 commit f93b36d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 15 deletions.
20 changes: 20 additions & 0 deletions .github/actions/build-website/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Build website
runs:
using: composite
steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: '3.9'
cache: 'pip'

- name: Install dependencies
run: |
pip install -r requirements.txt
- name: Build website
run: |
nikola build
16 changes: 1 addition & 15 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,8 @@ jobs:
runs-on: ubuntu-22.04

steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: '3.9'
cache: 'pip'

- name: Install dependencies
run: |
pip install -r requirements.txt
- name: Build website
run: |
nikola build
uses: ./.github/actions/build-website

- name: Install SSH key
uses: shimataro/ssh-key-action@v2
Expand Down

0 comments on commit f93b36d

Please sign in to comment.