-
Notifications
You must be signed in to change notification settings - Fork 9
48 lines (42 loc) · 1.35 KB
/
deploy_to_github_io.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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