awesome-wm-widgets/.github/workflows/update-site.yml

44 lines
1007 B
YAML
Raw Normal View History

2022-01-23 19:37:07 +01:00
name: update site
2022-01-24 03:14:18 +01:00
on:
push:
2022-01-24 03:25:09 +01:00
branches:
- 'master'
2022-01-24 03:14:18 +01:00
paths:
2022-01-24 03:25:09 +01:00
- README.md'
# Allows you to run this workflow manually from the Actions tab
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 02:14:35 +01:00
git add ./assets/img/widgets
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 02:14:35 +01:00
rm -rf ./assets/img/widgets
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-24 03:05:27 +01:00
git checkout stash -- ./assets/img/widgets
2022-01-23 20:57:13 +01:00
git add ./_widgets
2022-01-24 02:14:35 +01:00
git add ./assets/img/widgets
2022-01-23 20:57:13 +01:00
git commit -m "update from master"
git push origin gh-pages