fixed workflow
This commit is contained in:
parent
45956c58be
commit
d4f03a5cbe
1 changed files with 14 additions and 5 deletions
19
.github/workflows/deploy.yml
vendored
19
.github/workflows/deploy.yml
vendored
|
@ -9,9 +9,9 @@ on:
|
||||||
- setup.py
|
- setup.py
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_and_deploy:
|
get_script:
|
||||||
if: ${{ github.repository_owner == 'developomp' }} # prevents workflow from running in forked repos
|
if: ${{ github.repository_owner == 'developomp' }} # prevents workflow from running in forked repos
|
||||||
name: Deploy
|
name: Get script
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout master
|
- name: Checkout master
|
||||||
|
@ -23,6 +23,12 @@ jobs:
|
||||||
name: setup
|
name: setup
|
||||||
path: setup.py
|
path: setup.py
|
||||||
|
|
||||||
|
deploy_script:
|
||||||
|
if: ${{ github.repository_owner == 'developomp' }} # prevents workflow from running in forked repos
|
||||||
|
name: Deploy script
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: get_script
|
||||||
|
steps:
|
||||||
- name: Checkout gh-pages
|
- name: Checkout gh-pages
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
|
@ -37,16 +43,19 @@ jobs:
|
||||||
path: setup.py
|
path: setup.py
|
||||||
|
|
||||||
- name: Overwrite index.html
|
- name: Overwrite index.html
|
||||||
run: mv ./setup.py ./index.html
|
run: |
|
||||||
|
mv ./setup.py/setup.py ./index.html
|
||||||
|
rm -rf ./setup.py
|
||||||
|
|
||||||
- name: Commit files
|
- name: Commit files
|
||||||
run: |
|
run: |
|
||||||
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||||
git config --local user.name "github-actions[bot]"
|
git config --local user.name "github-actions[bot]"
|
||||||
git commit -m "auto deploy from workflow" -a
|
git add index.html
|
||||||
|
git commit -m "auto deploy from workflow"
|
||||||
|
|
||||||
- name: Push changes
|
- name: Push changes
|
||||||
uses: ad-m/github-push-action@master
|
uses: ad-m/github-push-action@master
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
branch: ${{ github.ref }}
|
branch: gh-pages
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue