2022-01-23 19:37:07 +01:00
|
|
|
name: update site
|
|
|
|
|
2022-01-23 19:40:58 +01:00
|
|
|
on: workflow_dispatch
|
|
|
|
|
2022-01-23 19:37:07 +01:00
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
2022-01-23 21:06:31 +01:00
|
|
|
- name: Generate md
|
|
|
|
run: ./scripts/update_site.sh
|
|
|
|
|
|
|
|
- name: Push to gh-pages branch
|
|
|
|
run: |
|
2022-01-23 20:57:13 +01:00
|
|
|
git config --global user.name 'GitHub Action'
|
|
|
|
git config --global user.email 'action@github.com'
|
2022-01-23 21:12:33 +01:00
|
|
|
git add ./_widgets
|
2022-01-24 01:24:03 +01:00
|
|
|
git add ./assets
|
2022-01-23 21:06:31 +01:00
|
|
|
git stash
|
2022-01-23 21:07:47 +01:00
|
|
|
git fetch
|
2022-01-23 21:15:41 +01:00
|
|
|
echo "git checkout gh-pages"
|
2022-01-23 21:06:31 +01:00
|
|
|
git checkout gh-pages
|
|
|
|
rm -rf ./_widgets
|
2022-01-24 01:24:03 +01:00
|
|
|
rm -rf ./assets
|
2022-01-23 21:17:32 +01:00
|
|
|
ls -alF
|
2022-01-23 21:15:41 +01:00
|
|
|
echo "git stash pop"
|
2022-01-24 01:16:11 +01:00
|
|
|
git checkout stash -- ./_widgets
|
2022-01-23 20:57:13 +01:00
|
|
|
git add ./_widgets
|
2022-01-24 01:24:03 +01:00
|
|
|
git add ./assets
|
2022-01-23 20:57:13 +01:00
|
|
|
git commit -m "update from master"
|
|
|
|
git push origin gh-pages
|
|
|
|
|