-
Notifications
You must be signed in to change notification settings - Fork 37
44 lines (35 loc) Β· 1.2 KB
/
Copy pathdeploy_docs.yml
File metadata and controls
44 lines (35 loc) Β· 1.2 KB
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
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:$GITHUB_TOKEN@github.com/$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 $GITHUB_ACTOR@users.noreply.github.com
git status --porcelain
git add --all .
git commit -m "Deploying from @ $GITHUB_SHA π"
git lfs migrate export --include="*"
git push -f