deploy.yml
Unicode text, UTF-8 text
1name: Python build site 2 3on: 4push: 5branches: [ "main" ] 6 7permissions: 8contents: write 9 10jobs: 11build: 12runs-on: ubuntu-latest 13strategy: 14matrix: 15python-version: ["3.12"] 16steps: 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 }} 20uses: actions/setup-python@v4 21with: 22python-version: ${{ matrix.python-version }} 23- name: Install Python dependencies 24uses: py-actions/py-dependency-install@v4 25with: 26path: "requirements.txt" 27# You can test your matrix by printing the current Python version 28- name: Pull Changes(?) 29run: | 30git pull 31- name: Run Python Builder 32run: 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 49uses: crazy-max/ghaction-github-pages@v1 50with: 51target_branch: gh-pages 52build_dir: build 53env: 54GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}