A mirror of my website's source code.

By using this site, you agree to have cookies stored on your device, strictly for functional purposes, such as storing your session and preferences.

Dismiss

 deploy.yml

View raw Download
text/plain • 1.81 kiB
Unicode text, UTF-8 text
        
            
1
name: Python build site
2
3
on:
4
push:
5
branches: [ "main" ]
6
7
permissions:
8
contents: write
9
10
jobs:
11
build:
12
runs-on: ubuntu-latest
13
strategy:
14
matrix:
15
python-version: ["3.12"]
16
steps:
17
- uses: actions/checkout@v4
18
# this Action should follow steps to set up Python build environment
19
- name: Set up Python ${{ matrix.python-version }}
20
uses: actions/setup-python@v4
21
with:
22
python-version: ${{ matrix.python-version }}
23
- name: Install Python dependencies
24
uses: py-actions/py-dependency-install@v4
25
with:
26
path: "requirements.txt"
27
# You can test your matrix by printing the current Python version
28
- name: Pull Changes(?)
29
run: |
30
git pull
31
- name: Run Python Builder
32
run: python build.py gh-pages-deploy
33
# - name: Commit docs directory
34
# run: |
35
# git add docs/
36
# git config --global user.name 'github-actions'
37
# git config --global user.email 'github-actions@github.com'
38
# git commit -am "build to docs dir"
39
# git push
40
# rm -rf docs/
41
# git add
42
# git commit -am "Removed built remnants"
43
# git push
44
# - name: Deploy 🚀
45
# uses: JamesIves/github-pages-deploy-action@v4
46
# with:
47
# folder: docs # The folder the action should deploy.
48
- name: Deploy
49
uses: crazy-max/ghaction-github-pages@v1
50
with:
51
target_branch: gh-pages
52
build_dir: build
53
env:
54
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}