Merge pull request #696 from ASFHyP3/opera-rtc-assets #706
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
| 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@v5 | |
| 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@v5 | |
| 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 |