diff --git a/.github/workflows/republish.yml b/.github/workflows/republish.yml index c97c59c1..0c8b54fd 100644 --- a/.github/workflows/republish.yml +++ b/.github/workflows/republish.yml @@ -1,8 +1,9 @@ name: Publish sequencer.publiclab.org demo on: - release: - types: [created] + push: + branches: + - stable jobs: merge: runs-on: ubuntu-latest @@ -12,45 +13,4 @@ jobs: run: | git config --global user.name 'jywarren' git config --global user.email 'jeff@unterbahn.com' - git pull --unshallow - git checkout gh-pages - git remote add upstream https://github.com/publiclab/image-sequencer.git - git fetch upstream - git reset --hard upstream/main - npm run setup --force - - grunt production - - if [ ! -f CNAME ]; - then - touch CNAME - fi - echo "sequencer.publiclab.org" > CNAME - - rm -R docs/ - rm -R test/ - rm CONTRIBUTING.md - rm index.js - - cp src/ui/prepareDynamic.js prepareDynamic.js - - rm -R src/ - mkdir -p src/ui/ - mv prepareDynamic.js src/ui/prepareDynamic.js - - git add . - git add -f node_modules/jquery/ - git add -f node_modules/bootstrap/ - git add -f node_modules/imgareaselect/ - git add -f node_modules/gifshot/ - git add -f node_modules/downloadjs/ - git add -f node_modules/selectize/ - git add -f node_modules/font-awesome/ - git add -f node_modules/bootstrap-colorpicker/ - git add -f node_modules/opencv.js - - git add -f dist/image-sequencer.js - git add -f dist/image-sequencer-ui.js - - git commit --no-verify -m "update main demo at sequencer.publiclab.org" - git push -f + ./scripts/update-gh-pages 'publiclab/image-sequencer' 'stable' 'sequencer.publiclab.org' 'bypass-warning'