1
0
Fork 0

added github workflow

This commit is contained in:
Kim, Jimin 2022-01-28 11:22:35 +09:00
parent 7edc63ca83
commit 3a4a6340a4

38
.github/workflows/deploy.yml vendored Normal file
View 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