added github workflow
This commit is contained in:
parent
7edc63ca83
commit
3a4a6340a4
1 changed files with 38 additions and 0 deletions
38
.github/workflows/deploy.yml
vendored
Normal file
38
.github/workflows/deploy.yml
vendored
Normal file
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue