39 lines
950 B
YAML
39 lines
950 B
YAML
name: Deploy
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 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
|