Skip to content

debug CI

debug CI #96

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Seispy docs
on:
push:
branches: [ docs ]
pull_request:
branches: [ master ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build_deploy:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Set branch name
id: vars
run: |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
echo ::set-output name=branch::${{ github.event.pull_request.head.ref }}
else
echo ::set-output name=branch::dev
fi
echo ${{ steps.vars.outputs.branch }}
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.9.1
- name: Checkout to docs branch
uses: actions/checkout@v4
with:
ref: docs
- name: Setup Mambaforge
uses: conda-incubator/setup-miniconda@v2.1.1
with:
activate-environment: docs
environment-file: environment.yml
# miniforge-variant: Mambaforge
# use-mamba: true
- name: Checkout to source branch
uses: actions/checkout@v4
with:
ref: ${{ steps.vars.outputs.branch }}
- name: Install Seispy
run: |
pip install .
- name: Checkout to docs branch
uses: actions/checkout@v4
with:
ref: docs
- name: Build documentation
run: |
make html
- name: Deploy documentation
uses: peaceiris/actions-gh-pages@068dc23d9710f1ba62e86896f84735d869951305
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build/html
# Only keep the latest commit to avoid bloating the repository
force_orphan: true
cname: seispy.xumijian.me
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'