Skip to content

Build and deploy site #3430

Build and deploy site

Build and deploy site #3430

Workflow file for this run

name: Build and deploy site
on:
repository_dispatch:
schedule:
- cron: '29 11 * * *'
pull_request:
push:
branches: [main]
jobs:
cancel-superseded:
name: Cancel superseded
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.12.0
with:
access_token: ${{ github.token }}
build-core-site:
needs: cancel-superseded
name: Build core site
runs-on: ubuntu-22.04
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.12.0
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v3
- name: Set up Ruby 2.7
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- uses: actions/setup-node@v3
with:
node-version: 14
cache: 'npm'
- name: Install deps
run: npm ci
- name: Build site
run: GITHUB_TOKEN=${{ github.token }} grunt build
- name: Debug
run: |
cat Gemfile.lock
bundle info jekyll
bundle info jekyll-theme-cayman
ls
cat dist/index.html
- name: Upload built site
uses: actions/upload-artifact@v4
with:
name: core-site
path: dist/*
build-msprime-docs:
name: Build msprime docs
needs: cancel-superseded
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
name: Checkout msprime
with:
ref: main
repository: tskit-dev/msprime
submodules: true
fetch-depth: 0 # Needed for setuptools_scm to work correctly
- name: Get commit SHA1 for cache
run: git rev-parse HEAD > SHA1
- uses: actions/cache@v2
id: docs-cache
name: Docs cache
with:
path: dist
key: msprime-docs-v11-${{ hashFiles('SHA1') }}
- name: Install GSL
if: steps.docs-cache.outputs.cache-hit != 'true'
run: sudo apt-get install -y libgsl0-dev
- uses: actions/setup-python@v2
if: steps.docs-cache.outputs.cache-hit != 'true'
name: Setup Python
with:
python-version: "3.10"
- name: Build virtualenv
if: steps.docs-cache.outputs.cache-hit != 'true'
run: python -m venv venv-latest
- name: Install deps
if: steps.docs-cache.outputs.cache-hit != 'true'
run: |
venv-latest/bin/activate && pip install -r requirements/CI-docs/requirements.txt
- name: Build C module
if: steps.docs-cache.outputs.cache-hit != 'true'
run: venv-latest/bin/activate && make
- name: Build Latest Docs
if: steps.docs-cache.outputs.cache-hit != 'true'
run: |
venv-latest/bin/activate
cd docs
make dist
# make dist changes the _conf.yml file to write the version number, so drop the change
git checkout .
- name: Copy docs
if: steps.docs-cache.outputs.cache-hit != 'true'
run: |
mkdir -p dist
cp -r docs/_build/html dist/latest
- name: Checkout latest stable tag
if: steps.docs-cache.outputs.cache-hit != 'true'
run: |
git fetch --tags --recurse-submodules=no
git checkout `git tag --list --sort=creatordate | grep -vi "[baC]" | tail -n1`
git submodule update --init --recursive
git status
# - name: Build virtualenv
# if: steps.docs-cache.outputs.cache-hit != 'true'
# run: python -m venv venv-stable
#
# - name: Install deps
# if: steps.docs-cache.outputs.cache-hit != 'true'
# run: |
# venv-stable/bin/activate
# [ -f requirements/CI-docs/requirements.txt ] && pip install -r requirements/CI-docs/requirements.txt
# [ -f requirements/development.txt ] && pip install -r requirements/development.txt
- name: Build C module
if: steps.docs-cache.outputs.cache-hit != 'true'
run: venv-latest/bin/activate && make
- name: Build Stable Docs
if: steps.docs-cache.outputs.cache-hit != 'true'
run: |
rm -rf docs/_build
venv-latest/bin/activate
cd docs
make dist
# make dist changes the _conf.yml file to write the version number, so drop the change
git checkout .
- name: Copy docs
if: steps.docs-cache.outputs.cache-hit != 'true'
run:
cp -r docs/_build/html dist/stable
- name: Upload msprime docs
uses: actions/upload-artifact@v4
with:
name: msprime-docs
path: dist/*
build-tsinfer-docs:
name: Build tsinfer docs
needs: cancel-superseded
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
name: Checkout tsinfer
with:
ref: main
repository: tskit-dev/tsinfer
submodules: true
fetch-depth: 0 # Needed for setuptools_scm to work correctly
- name: Get commit SHA1 for cache
run: git rev-parse HEAD > SHA1
- uses: actions/cache@v2
id: docs-cache
name: Docs cache
with:
path: dist
key: tsinfer-docs-v1-${{ hashFiles('SHA1') }}
- uses: actions/setup-python@v4
if: steps.docs-cache.outputs.cache-hit != 'true'
name: Setup Python
with:
python-version: "3.10"
- name: Build virtualenv
if: steps.docs-cache.outputs.cache-hit != 'true'
run: python -m venv venv-latest
- name: Install deps
if: steps.docs-cache.outputs.cache-hit != 'true'
run: |
venv-latest/bin/activate && pip install -r requirements/CI-docs/requirements.txt
sudo apt-get install tabix
- name: Build C module
if: steps.docs-cache.outputs.cache-hit != 'true'
run: venv-latest/bin/activate && make
- name: Build Latest Docs
if: steps.docs-cache.outputs.cache-hit != 'true'
run: |
venv-latest/bin/activate
cd docs
make dist
# make dist changes the _conf.yml file to write the version number, so drop the change
git checkout .
- name: Copy docs
if: steps.docs-cache.outputs.cache-hit != 'true'
run: |
mkdir -p dist
cp -r docs/_build/html dist/latest
- name: Checkout latest stable tag
if: steps.docs-cache.outputs.cache-hit != 'true'
run: |
git fetch --tags --recurse-submodules=no
git checkout `git tag --list --sort=creatordate | grep -vi "[baC]" | tail -n1`
git submodule update --init --recursive
git status
- uses: actions/setup-python@v4
if: steps.docs-cache.outputs.cache-hit != 'true'
name: Setup Python
with:
python-version: "3.10"
- name: Build virtualenv
if: steps.docs-cache.outputs.cache-hit != 'true'
run: python -m venv venv-stable
- name: Install deps
if: steps.docs-cache.outputs.cache-hit != 'true'
run: |
venv-stable/bin/activate
[ -f requirements/CI-docs/requirements.txt ] && pip install -r requirements/CI-docs/requirements.txt
- name: Build C module
if: steps.docs-cache.outputs.cache-hit != 'true'
run: |
venv-latest/bin/activate && make
- name: Build Stable Docs
if: steps.docs-cache.outputs.cache-hit != 'true'
run: |
rm -rf docs/_build
venv-latest/bin/activate
cd docs
make dist
# make dist changes the _conf.yml file to write the version number, so drop the change
git checkout .
- name: Copy docs
if: steps.docs-cache.outputs.cache-hit != 'true'
run:
cp -r docs/_build/html dist/stable
- name: Upload tsinfer docs
uses: actions/upload-artifact@v4
with:
name: tsinfer-docs
path: dist/*
build-tskit-docs:
name: Build tskit docs
needs: cancel-superseded
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
name: Checkout tskit
with:
ref: main
repository: tskit-dev/tskit
submodules: true
fetch-depth: 0 # Needed for setuptools_scm to work correctly
- name: Get commit SHA1 for cache
run: git rev-parse HEAD > SHA1
- uses: actions/cache@v2
id: docs-cache
name: Docs cache
with:
path: dist
key: tskit-docs-v7-${{ hashFiles('SHA1') }}
- uses: actions/setup-python@v4
if: steps.docs-cache.outputs.cache-hit != 'true'
name: Setup Python
with:
python-version: "3.10"
- name: Build virtualenv
if: steps.docs-cache.outputs.cache-hit != 'true'
run: python -m venv venv-latest
- name: Install deps
if: steps.docs-cache.outputs.cache-hit != 'true'
run: |
sudo apt-get install doxygen
venv-latest/bin/activate && pip install -r python/requirements/CI-docs/requirements.txt
- name: Build C module
if: steps.docs-cache.outputs.cache-hit != 'true'
run: venv-latest/bin/activate && make -C python
- name: Build Latest Docs
if: steps.docs-cache.outputs.cache-hit != 'true'
run: |
venv-latest/bin/activate
cd docs
make dist
- name: Copy docs
if: steps.docs-cache.outputs.cache-hit != 'true'
run: |
mkdir -p dist
cp -r docs/_build/html dist/latest
- name: Checkout latest stable tag
if: steps.docs-cache.outputs.cache-hit != 'true'
run: |
git stash
git fetch --tags --recurse-submodules=no
git checkout `git tag --list --sort=creatordate | grep -vi "[baC]" | tail -n1`
git submodule update --init --recursive
git status
- uses: actions/setup-python@v4
if: steps.docs-cache.outputs.cache-hit != 'true'
name: Setup Python
with:
python-version: "3.10"
- name: Build virtualenv
if: steps.docs-cache.outputs.cache-hit != 'true'
run: python -m venv venv-stable
- name: Downgrade pip (for conflicting dependencies)
if: steps.docs-cache.outputs.cache-hit != 'true'
run: venv-stable/bin/activate && pip install pip==20.0.2
- name: Install deps
if: steps.docs-cache.outputs.cache-hit != 'true'
# Remove this second line after next release of tskit
run: |
venv-stable/bin/activate && pip install -r python/requirements/CI-docs/requirements.txt
venv-stable/bin/activate && pip install nbclient==0.5.13
- name: Build C module
if: steps.docs-cache.outputs.cache-hit != 'true'
run: venv-stable/bin/activate && make -C python
- name: Build Stable Docs
if: steps.docs-cache.outputs.cache-hit != 'true'
run: |
rm -rf docs/_build
venv-stable/bin/activate
# Install jsonschema for bugfix
pip install jsonschema[format-nongpl]==4.17.3
cd docs
# A sphinx-book-theme breaking change needs this
sed -i '/html_theme_options:/a\ \ \ \ \ \ \ \ navigation_with_keys: False' _config.yml
make dist || make
- name: Copy docs
if: steps.docs-cache.outputs.cache-hit != 'true'
run: |
cp -r docs/_build/html dist/stable
- name: Upload tskit docs
uses: actions/upload-artifact@v4
with:
name: tskit-docs
path: dist/*
build-pyslim-docs:
name: Build pyslim docs
needs: cancel-superseded
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
name: Checkout pyslim
with:
ref: main
repository: tskit-dev/pyslim
submodules: true
fetch-depth: 0 # Needed for setuptools_scm to work correctly
- name: Get commit SHA1 for cache
run: git rev-parse HEAD > SHA1
- uses: actions/cache@v2
id: docs-cache
name: Docs cache
with:
path: dist
key: pyslim-docs-v6-${{ hashFiles('SHA1') }}
- uses: actions/setup-python@v2
if: steps.docs-cache.outputs.cache-hit != 'true'
name: Setup Python
with:
python-version: "3.10"
- name: Build latest SLiM
if: steps.docs-cache.outputs.cache-hit != 'true'
run: |
git clone https://github.com/messerlab/SLiM.git
mkdir -p SLiM/Release
cd SLiM/Release
cmake -D CMAKE_BUILD_TYPE=Release ..
make -j 2
- name: Build virtualenv
if: steps.docs-cache.outputs.cache-hit != 'true'
run: python -m venv venv-latest
- name: Install deps
if: steps.docs-cache.outputs.cache-hit != 'true'
run: |
venv-latest/bin/activate
pip install -r requirements/CI-docs/requirements.txt
- name: Build Latest Docs
if: steps.docs-cache.outputs.cache-hit != 'true'
run: |
venv-latest/bin/activate
export PATH=$PATH:$PWD/SLiM/Release
cd docs
# don't re-generate these which require tricky prerequisites (inkscape, xmlstarlet)
touch _static/{pedigree0.svg,pedigree1.svg,pedigree2.svg,pedigree_recapitate.svg,pedigree_simplify.svg,pedigree_mutate.svg}
touch _static/{pedigree01.png,pedigree0.png,pedigree1.png,pedigree2.png,pedigree_recapitate.png,pedigree_simplify.png,pedigree_mutate.png}
make dist
# make dist changes the _conf.yml file to write the version number, so drop the change
git checkout .
- name: Copy docs
if: steps.docs-cache.outputs.cache-hit != 'true'
run: |
mkdir -p dist
cp -r docs/_build/html dist/latest
- name: Build stable SLiM
if: steps.docs-cache.outputs.cache-hit != 'true'
run: |
mkdir -p SLiM/Stable
cd SLiM/Stable
git fetch --tags --recurse-submodules=no
git checkout `git tag --list --sort=creatordate | grep -vi "[baC]" | tail -n1`
git status
cmake -D CMAKE_BUILD_TYPE=Release ..
make -j 2
- name: Checkout latest stable tag
if: steps.docs-cache.outputs.cache-hit != 'true'
run: |
git fetch --tags --recurse-submodules=no
git checkout `git tag --list --sort=creatordate | grep -vi "[baC]" | tail -n1`
git submodule update --init --recursive
git status
# As docs build has had issues with dependancies, just use venv-latest for now
# - name: Build virtualenv
# if: steps.docs-cache.outputs.cache-hit != 'true'
# run: python -m venv venv-stable
#
# - name: Install deps
# if: steps.docs-cache.outputs.cache-hit != 'true'
# run: |
# venv-stable/bin/activate
# pip install -r requirements/CI-docs/requirements.txt
- name: Build Stable Docs
if: steps.docs-cache.outputs.cache-hit != 'true'
run: |
rm -rf docs/_build
venv-latest/bin/activate
export PATH=$PWD/SLiM/Stable:$PATH
cd docs
# A sphinx-book-theme breaking change needs this
sed -i '/html_theme_options:/a\ \ \ \ \ navigation_with_keys: False' _config.yml
# don't re-generate these which require tricky prerequisites (inkscape, xmlstarlet)
touch _static/{pedigree0.svg,pedigree1.svg,pedigree2.svg,pedigree_recapitate.svg,pedigree_simplify.svg,pedigree_mutate.svg}
touch _static/{pedigree01.png,pedigree0.png,pedigree1.png,pedigree2.png,pedigree_recapitate.png,pedigree_simplify.png,pedigree_mutate.png}
make dist
# make dist changes the _conf.yml file to write the version number, so drop the change
git checkout .
- name: Copy docs
if: steps.docs-cache.outputs.cache-hit != 'true'
run:
cp -r docs/_build/html dist/stable
- name: Upload pyslim docs
uses: actions/upload-artifact@v4
with:
name: pyslim-docs
path: dist/*
build-tstrait-docs:
name: Build tstrait docs
needs: cancel-superseded
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
name: Checkout tstrait
with:
ref: main
repository: tskit-dev/tstrait
- name: Get commit SHA1 for cache
run: git rev-parse HEAD > SHA1
- uses: actions/cache@v2
id: docs-cache
name: Docs cache
with:
path: dist
key: tstrait-docs-v3-${{ hashFiles('SHA1') }}
- uses: actions/setup-python@v2
if: steps.docs-cache.outputs.cache-hit != 'true'
name: Setup Python
with:
python-version: "3.10"
- name: Build virtualenv
if: steps.docs-cache.outputs.cache-hit != 'true'
run: python -m venv venv-latest
- name: Install deps
if: steps.docs-cache.outputs.cache-hit != 'true'
run: |
venv-latest/bin/activate && pip install -r requirements/CI-docs/requirements.txt
- name: Build Latest Docs
if: steps.docs-cache.outputs.cache-hit != 'true'
run: |
venv-latest/bin/activate
cd docs
make dist
# make dist changes the _conf.yml file to write the version number, so drop the change
git checkout .
- name: Copy docs
if: steps.docs-cache.outputs.cache-hit != 'true'
run: |
mkdir -p dist
cp -r docs/_build/html dist/latest
- name: Checkout latest stable tag
if: steps.docs-cache.outputs.cache-hit != 'true'
run: |
git fetch --tags --recurse-submodules=no
git checkout `git tag --list --sort=creatordate | grep -vi "[baC]" | tail -n1`
git status
- name: Build Stable Docs
if: steps.docs-cache.outputs.cache-hit != 'true'
run: |
rm -rf docs/_build
venv-latest/bin/activate
cd docs
make dist
# make dist changes the _conf.yml file to write the version number, so drop the change
git checkout .
- name: Copy docs
if: steps.docs-cache.outputs.cache-hit != 'true'
run:
cp -r docs/_build/html dist/stable
- name: Upload tstrait docs
uses: actions/upload-artifact@v4
with:
name: tstrait-docs
path: dist/*
build-tsdate-docs:
name: Build tsdate docs
needs: cancel-superseded
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
name: Checkout tsdate
with:
ref: main
repository: tskit-dev/tsdate
- name: Get commit SHA1 for cache
run: git rev-parse HEAD > SHA1
- uses: actions/cache@v2
id: docs-cache
name: Docs cache
with:
path: dist
key: tsdate-docs-v2-${{ hashFiles('SHA1') }}
- uses: actions/setup-python@v2
if: steps.docs-cache.outputs.cache-hit != 'true'
name: Setup Python
with:
python-version: "3.10"
- name: Build virtualenv
if: steps.docs-cache.outputs.cache-hit != 'true'
run: python -m venv venv-latest
- name: Install deps
if: steps.docs-cache.outputs.cache-hit != 'true'
run: |
venv-latest/bin/activate && pip install -r docs/requirements.txt
- name: Build Latest Docs
if: steps.docs-cache.outputs.cache-hit != 'true'
run: |
venv-latest/bin/activate
cd docs
make dist
# make dist changes the _conf.yml file to write the version number, so drop the change
git checkout .
- name: Copy docs
if: steps.docs-cache.outputs.cache-hit != 'true'
run: |
mkdir -p dist
cp -r docs/_build/html dist/latest
- name: Checkout latest stable tag
if: steps.docs-cache.outputs.cache-hit != 'true'
run: |
git fetch --tags --recurse-submodules=no
git checkout `git tag --list --sort=creatordate | grep -vi "[baC]" | tail -n1`
git status
- name: Build Stable Docs
if: steps.docs-cache.outputs.cache-hit != 'true'
run: |
rm -rf docs/_build
venv-latest/bin/activate
python -m pip install "numpy<2"
cd docs
make dist
# make dist changes the _conf.yml file to write the version number, so drop the change
git checkout .
- name: Copy docs
if: steps.docs-cache.outputs.cache-hit != 'true'
run:
cp -r docs/_build/html dist/stable
- name: Upload tsdate docs
uses: actions/upload-artifact@v4
with:
name: tsdate-docs
path: dist/*
build-tszip-docs:
name: Build tszip docs
needs: cancel-superseded
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
name: Checkout tszip
with:
ref: main
repository: tskit-dev/tszip
- name: Get commit SHA1 for cache
run: git rev-parse HEAD > SHA1
- uses: actions/cache@v2
id: docs-cache
name: Docs cache
with:
path: dist
key: tszip-docs-v2-${{ hashFiles('SHA1') }}
- uses: actions/setup-python@v2
if: steps.docs-cache.outputs.cache-hit != 'true'
name: Setup Python
with:
python-version: "3.10"
- name: Build virtualenv
if: steps.docs-cache.outputs.cache-hit != 'true'
run: python -m venv venv-latest
- name: Install deps
if: steps.docs-cache.outputs.cache-hit != 'true'
run: |
venv-latest/bin/activate && pip install -r requirements/CI-docs.txt
- name: Build Latest Docs
if: steps.docs-cache.outputs.cache-hit != 'true'
run: |
venv-latest/bin/activate
cd docs
make dist
# make dist changes the _conf.yml file to write the version number, so drop the change
git checkout .
- name: Copy docs
if: steps.docs-cache.outputs.cache-hit != 'true'
run: |
mkdir -p dist
cp -r docs/_build/html dist/latest
# Disabled until next tszip release - also reinstate redirect on line 917
# - name: Checkout latest stable tag
# if: steps.docs-cache.outputs.cache-hit != 'true'
# run: |
# git fetch --tags --recurse-submodules=no
# git checkout `git tag --list --sort=creatordate | grep -vi "[baC]" | tail -n1`
# git status
#
# - name: Build Stable Docs
# if: steps.docs-cache.outputs.cache-hit != 'true'
# run: |
# rm -rf docs/_build
# venv-latest/bin/activate
# cd docs
# make dist
# # make dist changes the _conf.yml file to write the version number, so drop the change
# git checkout .
#
# - name: Copy docs
# if: steps.docs-cache.outputs.cache-hit != 'true'
# run:
# cp -r docs/_build/html dist/stable
- name: Upload tszip docs
uses: actions/upload-artifact@v4
with:
name: tszip-docs
path: dist/*
import-tutorials:
name: Import tutorials
needs: cancel-superseded
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
name: Checkout tutorials
with:
ref: gh-pages
repository: tskit-dev/tutorials
- name: Upload tutorials
uses: actions/upload-artifact@v4
with:
name: tutorials
path: .
import-rust-tutorial:
name: Import rust tutorials
needs: cancel-superseded
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
name: Checkout tutorials
with:
ref: gh-pages
repository: tskit-dev/tskit-rust
- name: Upload tutorials
uses: actions/upload-artifact@v4
with:
name: rust-tutorials
path: .
deploy:
name: Deploy 🚀 (if on main branch)
needs:
- build-core-site
- build-msprime-docs
- build-tsinfer-docs
- build-tskit-docs
- build-pyslim-docs
- build-tsdate-docs
- build-tszip-docs
- build-tstrait-docs
- import-tutorials
- import-rust-tutorial
runs-on: ubuntu-latest
steps:
- name: Download core site
uses: actions/download-artifact@v4
with:
name: core-site
path: site
- name: Download msprime-docs
uses: actions/download-artifact@v4
with:
name: msprime-docs
path: site/msprime/docs
- name: Download tsinfer-docs
uses: actions/download-artifact@v4
with:
name: tsinfer-docs
path: site/tsinfer/docs
- name: Download tskit-docs
uses: actions/download-artifact@v4
with:
name: tskit-docs
path: site/tskit/docs
- name: Download tstrait-docs
uses: actions/download-artifact@v4
with:
name: tstrait-docs
path: site/tstrait/docs
- name: Download pyslim-docs
uses: actions/download-artifact@v4
with:
name: pyslim-docs
path: site/pyslim/docs
- name: Download tsdate-docs
uses: actions/download-artifact@v4
with:
name: tsdate-docs
path: site/tsdate/docs
- name: Download tszaip-docs
uses: actions/download-artifact@v4
with:
name: tszip-docs
path: site/tszip/docs
- name: Download tutorials
uses: actions/download-artifact@v4
with:
name: tutorials
path: site/tutorials
- name: Download rust tutorial
uses: actions/download-artifact@v4
with:
name: rust-tutorials
path: site/tutorials/rust
- name: Pages config and tweaks
run: |
touch site/.nojekyll
echo "tskit.dev" > site/CNAME
echo "<meta http-equiv=\"Refresh\" content=\"0; url=/msprime/docs/stable\" />" > site/msprime/docs/index.html
echo "<meta http-equiv=\"Refresh\" content=\"0; url=/tsinfer/docs/stable\" />" > site/tsinfer/docs/index.html
echo "<meta http-equiv=\"Refresh\" content=\"0; url=/tskit/docs/stable\" />" > site/tskit/docs/index.html
echo "<meta http-equiv=\"Refresh\" content=\"0; url=/pyslim/docs/stable\" />" > site/pyslim/docs/index.html
echo "<meta http-equiv=\"Refresh\" content=\"0; url=/tstrait/docs/stable\" />" > site/tstrait/docs/index.html
echo "<meta http-equiv=\"Refresh\" content=\"0; url=/tsdate/docs/stable\" />" > site/tsdate/docs/index.html
echo "<meta http-equiv=\"Refresh\" content=\"0; url=/tszip/docs/latest\" />" > site/tszip/docs/index.html
- name: List site contents
run: |
ls -R
- name: Upload site (for PR inspection)
uses: actions/upload-artifact@v4
with:
name: site
path: .
- name: Deploy
if: github.ref == 'refs/heads/main'
uses: JamesIves/github-pages-deploy-action@3.7.1
with:
GITHUB_TOKEN: ${{ secrets.ADMINBOT_TOKEN }}
BRANCH: gh-pages
FOLDER: site
SINGLE_COMMIT: true