Added checkout before copy
This commit is contained in:
parent
69c27816f3
commit
3efb7b533e
|
@ -38,21 +38,22 @@ jobs:
|
|||
commit_message: 'Update samples.json'
|
||||
file_pattern: samples.json
|
||||
push_options: '--force'
|
||||
|
||||
- name: Checkout gh-pages branch
|
||||
run: |
|
||||
git fetch
|
||||
git checkout gh-pages
|
||||
- name: Copy samples.json to gh-pages branch
|
||||
run: cp samples.json ./samples.json
|
||||
|
||||
- name: Checkout main branch
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: 'main'
|
||||
path: 'main'
|
||||
|
||||
- name: Checkout gh-pages branch
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: 'gh-pages'
|
||||
path: 'gh-pages'
|
||||
|
||||
- name: Copy samples.json to gh-pages branch
|
||||
run: cp main/samples.json gh-pages/samples.json
|
||||
|
||||
# - name: Commit samples.json to gh-pages branch
|
||||
# run: |
|
||||
# git config --local user.email "${{ secrets.USER_EMAIL }}"
|
||||
# git config --local user.name "${{ secrets.USER_NAME }}"
|
||||
# git add ./samples.json
|
||||
# git commit -m "Update samples.json in gh-pages branch"
|
||||
# git push origin gh-pages
|
||||
|
||||
- name: Commit to gh-pages branch
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
||||
|
|
Loading…
Reference in New Issue