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
|
||||
with:
|
||||
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
|
||||
uses: actions/download-artifact@v2
|
||||
|
@ -34,10 +36,17 @@ jobs:
|
|||
name: setup
|
||||
path: setup.py
|
||||
|
||||
- name: Deploy
|
||||
- name: Overwrite index.html
|
||||
run: mv ./setup.py ./index.html
|
||||
|
||||
- name: Commit files
|
||||
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 -am "auto deploy from workflow"
|
||||
git push
|
||||
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git config --local user.name "github-actions[bot]"
|
||||
git commit -m "auto deploy from workflow" -a
|
||||
|
||||
- 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