Skip to content

Commit b70b909

Browse files
authored
Create build.yml
1 parent e5930ec commit b70b909

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/build.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Build and deploy pages
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
name: Build pages
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Set up Python
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: '3.12'
20+
- name: Install deps
21+
run: |
22+
python -m pip install -U pip
23+
pip install markdown pygments
24+
- name: Build
25+
run: |
26+
python makesite.py
27+
- name: Upload
28+
uses: actions/upload-pages-artifact@v3
29+
with:
30+
path: "./output"
31+
32+
deploy:
33+
needs: build
34+
permissions:
35+
pages: write # to deploy to Pages
36+
id-token: write # to verify the deployment originates from an appropriate source
37+
environment:
38+
name: github-pages
39+
url: ${{ steps.deployment.outputs.page_url }}
40+
runs-on: ubuntu-latest
41+
steps:
42+
- name: Deploy to GitHub Pages
43+
id: deployment
44+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)