Skip to content

Commit 4c42242

Browse files
committed
Add GitHub Actions to test and deploy
1 parent 3894876 commit 4c42242

4 files changed

Lines changed: 72 additions & 0 deletions

File tree

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"

.github/workflows/deploy.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Deploy over SSH
13+
uses: appleboy/ssh-action@v1.2.5
14+
with:
15+
host: ${{ secrets.SERVER_HOST }}
16+
username: ${{ secrets.SERVER_USER }}
17+
key: ${{ secrets.SSH_KEY }}
18+
script: ${{ secrets.DEPLOY_COMMAND }}

.github/workflows/deploy_draft.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Deploy draft site
2+
3+
on:
4+
push:
5+
branches:
6+
- draft
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Deploy over SSH
13+
uses: appleboy/ssh-action@v1.2.5
14+
with:
15+
host: ${{ secrets.SERVER_HOST }}
16+
username: ${{ secrets.SERVER_USER }}
17+
key: ${{ secrets.SSH_KEY }}
18+
script: ${{ secrets.DRAFT_DEPLOY_COMMAND }}

.github/workflows/test.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Test build
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
test:
7+
runs-on: ubuntu-latest
8+
9+
strategy:
10+
matrix:
11+
python-version: ["3.10"]
12+
13+
steps:
14+
- name: Check out code
15+
uses: actions/checkout@v6
16+
17+
- name: Set up Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v6
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install beemo
26+
27+
- name: Build the site
28+
env:
29+
BEEMO_CONFIG: config.yml
30+
run: beemo build

0 commit comments

Comments
 (0)