Change base URL to t-rex.bbox.earth #30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on: push | |
| name: Build and deploy GH Pages | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install zola | |
| run: wget -q -O - "https://github.com/getzola/zola/releases/download/v${ZOLA_VERSION}/zola-v${ZOLA_VERSION}-x86_64-unknown-linux-gnu.tar.gz" | sudo tar xzf - -C /usr/local/bin | |
| env: | |
| ZOLA_VERSION: 0.14.1 | |
| - uses: actions/checkout@v2 | |
| with: | |
| fetch-depth: 0 | |
| - name: build and deploy | |
| run: | | |
| git config user.name "GitHub Actions" | |
| git config user.email "github-actions-bot@users.noreply.github.com" | |
| # Build master branch | |
| git checkout master | |
| sed -i 's/title = "t-rex"/title = "t-rex (dev)"/g' config.toml | |
| zola build --base-url https://t-rex.bbox.earth/dev | |
| git checkout config.toml | |
| git checkout gh-pages && rm -rf dev && mv public dev | |
| git add --all dev | |
| git commit -a -m "rebuild pages" || true | |
| # Build release branch | |
| git checkout release | |
| zola build --base-url https://t-rex.bbox.earth | |
| git checkout gh-pages && cp -r public/* . | |
| git add --all . | |
| git commit -a -m "rebuild pages" || true | |
| git push origin HEAD:gh-pages |