-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CI job to push documentation for the current branch
[update-doc]
- Loading branch information
1 parent
e0fcab0
commit c5cffea
Showing
1 changed file
with
27 additions
and
3 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -116,12 +116,36 @@ jobs: | |
- name: Checkout website repository | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: 'Colvars/colvars.github.io' | ||
ssh-key: ${{ secrets.PULL_PUSH_COLVARS_GITHUB_IO }} | ||
repository: '[email protected]:Colvars/colvars.github.io' | ||
path: 'website' | ||
|
||
- name: Build doc | ||
- name: Build doc for current branch | ||
working-directory: doc | ||
run: apptainer exec ${{ github.workspace }}/devel-tools/texlive.sif make | ||
run: | | ||
make clean-all | ||
apptainer exec ${{ github.workspace }}/devel-tools/texlive.sif make | ||
- name: Install SSH key for access to website repository | ||
if: contains(github.event.head_commit.message, '[update-doc]') | ||
env: | ||
WEBSITE_SSH_KEY: ${{ secrets.PULL_PUSH_COLVARS_GITHUB_IO }} | ||
run: | | ||
mkdir -p -m 700 ~/.ssh | ||
echo "${WEBSITE_SSH_KEY}" > ~/.ssh/website | ||
chmod 600 ~/.ssh/website | ||
- name: Push updated doc to website repository | ||
working-directory: doc | ||
if: contains(github.event.head_commit.message, '[update-doc]') | ||
env: | ||
COLVARS_WEBSITE_TREE: ${{ github.workspace }}/website | ||
run: | | ||
apptainer exec ${{ github.workspace }}/devel-tools/texlive.sif make install | ||
export GIT_SSH="ssh -i ~/.ssh/website" | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "CI runner" | ||
bash update_website.sh ${{ github.workspace }}/website | ||
codeql: | ||
|