replaced manual commands with github actions
This commit is contained in:
parent
4cd4416dfd
commit
45956c58be
1 changed files with 15 additions and 6 deletions
21
.github/workflows/deploy.yml
vendored
21
.github/workflows/deploy.yml
vendored
|
@ -27,6 +27,8 @@ jobs:
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
ref: gh-pages
|
ref: gh-pages
|
||||||
|
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
|
||||||
|
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
|
||||||
|
|
||||||
- name: Download Artifact
|
- name: Download Artifact
|
||||||
uses: actions/download-artifact@v2
|
uses: actions/download-artifact@v2
|
||||||
|
@ -34,10 +36,17 @@ jobs:
|
||||||
name: setup
|
name: setup
|
||||||
path: setup.py
|
path: setup.py
|
||||||
|
|
||||||
- name: Deploy
|
- name: Overwrite index.html
|
||||||
|
run: mv ./setup.py ./index.html
|
||||||
|
|
||||||
|
- name: Commit files
|
||||||
run: |
|
run: |
|
||||||
git config --local user.email "developomp@users.noreply.github.com"
|
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||||
git config --local user.name "developomp"
|
git config --local user.name "github-actions[bot]"
|
||||||
mv ./setup.py ./index.html # overwrite index.html
|
git commit -m "auto deploy from workflow" -a
|
||||||
git commit -am "auto deploy from workflow"
|
|
||||||
git push
|
- name: Push changes
|
||||||
|
uses: ad-m/github-push-action@master
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
branch: ${{ github.ref }}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue