build-deploy.yml
ASCII text
1name: Build and Deploy site to Nekoweb 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- name: Set up Python ${{ matrix.python-version }} 19uses: actions/setup-python@v5 20with: 21python-version: ${{ matrix.python-version }} 22- name: Install Python dependencies 23uses: py-actions/py-dependency-install@v4 24with: 25path: "requirements.txt" 26- name: Pull Changes 27run: | 28git pull 29- name: Build Site 30run: python build.py 31- name: Archive production artifacts 32uses: actions/upload-artifact@v4 33with: 34path: build 35deploy: 36if: "contains(github.event.head_commit.message, '!action/build-deploy')" 37needs: [build] 38runs-on: ubuntu-latest 39strategy: 40matrix: 41python-version: [ "3.12" ] 42steps: 43- uses: actions/checkout@v4 44- name: Download build results 45uses: actions/download-artifact@v4 46- name: Deploy to Nekoweb 47uses: mp-pinheiro/nekoweb-deploy@main 48with: 49API_KEY: ${{ secrets.NEKOWEB_API_KEY }} 50BUILD_DIR: "/home/runner/work/WikiGen/WikiGen/artifact" 51DEPLOY_DIR: "/build" 52CLEANUP: "True" 53DELAY: "0.5" 54NEKOWEB_PAGENAME: "steve0greatness" 55