Run git fetch before switching branches

This ensures the desired branch is available.

This closes #9.
This commit is contained in:
Hugo Locurcio
2020-04-08 16:22:13 +02:00
committed by BARICHELLO
parent a80ac562e6
commit 4b40190b44

View File

@@ -55,6 +55,8 @@ deploy-github-pages:
dependencies: dependencies:
- web - web
script: script:
# This ensures the `gh-pages` branch is available.
- git fetch
- git checkout gh-pages - git checkout gh-pages
- rm -f *.md - rm -f *.md
- mv build/web/** . - mv build/web/** .
@@ -71,6 +73,8 @@ pages:
dependencies: dependencies:
- web - web
script: script:
# This ensures the `pages` branch is available.
- git fetch
- git checkout pages - git checkout pages
- rm -f *.md - rm -f *.md
- mv build/web/** ./public - mv build/web/** ./public