-
Notifications
You must be signed in to change notification settings - Fork 1
62 lines (60 loc) · 1.74 KB
/
deploy-website.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: deploy-website
on:
push:
branches:
- main
pull_request:
branches:
- main
# This job installs dependencies, build the website, and pushes it to `gh-pages`
jobs:
deploy-website:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
strategy:
matrix:
python-version: ["3.11"]
if: github.repository == 'wradlib/wradlib.github.io'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install micromamba environment
uses: mamba-org/provision-with-micromamba@main
with:
environment-name: wradlib-dev
environment-file: environment.yml
extra-specs: |
python=${{ matrix.python-version }}
# Build the website
- name: Build the site
run: |
make dirhtml
# Zip and Upload artifact
- name: Zip the site
run: |
set -x
set -e
if [ -f landing-page.zip ]; then
rm -rf landing-page.zip
fi
zip -r landing-page.zip ./_build/dirhtml
- name: Upload zipped site artifact
uses: actions/upload-artifact@v3
with:
name: landing-page-zip-${{github.event.number}}
path: ./landing-page.zip
# Push the book's HTML to github-pages
- name: Deploy GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_build/dirhtml
force_orphan: true
user_email: "[email protected]"
user_name: "wradlib-docs-bot"
commit_message: ${{ github.event.head_commit.message }}
cname: wradlib.org