Deploy documentation #58
Workflow file for this run
This file contains 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 documentation | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
persist-credentials: false | |
- name: Pull docker image 🐳 | |
run: docker pull cmsml/documentation | |
- name: Build 🔧 | |
run: ./docker/run.sh build | |
- name: Deploy 🚀 | |
env: | |
PAGES_BRANCH: gh-pages | |
SITE_DIR: site | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
git clone -b $PAGES_BRANCH https://$GITHUB_ACTOR:[email protected]/$GITHUB_REPOSITORY.git gh-pages-deployment-folder | |
rsync -q -av --checksum --progress $SITE_DIR/. gh-pages-deployment-folder --exclude .ssh --exclude .git --exclude .github --exclude '*.gz' | |
cd gh-pages-deployment-folder | |
git config user.name $GITHUB_ACTOR | |
git config user.email [email protected] | |
git status --porcelain | |
git add --all . | |
git commit -m "Deploying from @ $GITHUB_SHA 🚀" | |
git lfs migrate export --include="*" | |
git push -f |