diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..e404570 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,38 @@ +name: Deploy + +on: + push: + - master + +jobs: + build_and_deploy: + if: ${{ github.repository_owner == 'developomp' }} # prevents workflow from running in forked repos + name: Deploy + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v2 + + - name: Archive Artifact + uses: actions/upload-artifact@v2 + with: + name: setup + path: setup.py + + - name: Switch branch + run: | + git checkout gh-pages + + - name: Download Artifact + uses: actions/download-artifact@v2 + with: + name: setup + path: setup.py + + - name: Deploy + run: | + git config --local user.email 'developomp@users.noreply.github.com' + git config --local user.name "developomp" + mv ./setup.py ./index.html # overwrite index.html + git commit -ma "auto deploy from workflow" + git push