Skip to content

Merge pull request #458 from ASFHyP3/bump-asf-tools-v0.8.0 #502

Merge pull request #458 from ASFHyP3/bump-asf-tools-v0.8.0

Merge pull request #458 from ASFHyP3/bump-asf-tools-v0.8.0 #502

name: Deploy to Github.io
on:
push:
branches:
- main
- develop
jobs:
build_and_deploy:
name: Build site and deploy
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
with:
path: hyp3-docs
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: '3.10'
activate-environment: hyp3-docs
environment-file: hyp3-docs/environment.yml
- name: Deploy test website
if: github.ref == 'refs/heads/develop'
shell: bash -l {0}
run: |
cd hyp3-docs
# Remove conflicting CNAME for project site
rm docs/CNAME
# Set site URL for dev site
sed -i 's|site_url: https://hyp3-docs.asf.alaska.edu/|site_url: https://hyp3-docs.asf.alaska.edu/hyp3-docs/|' mkdocs.yml
mkdocs gh-deploy --force
- uses: actions/checkout@v4
if: github.ref == 'refs/heads/main'
with:
repository: ASFHyP3/ASFHyP3.github.io
path: ASFHyP3.github.io
token: ${{ secrets.TOOLS_BOT_PAK }}
- name: deploy to github.io
if: github.ref == 'refs/heads/main'
shell: bash -l {0}
run: |
cd ASFHyP3.github.io
mkdocs gh-deploy --force --config-file ../hyp3-docs/mkdocs.yml --remote-branch main