MapServer / MapServer-documentation

Source repository for the MapServer documentation, for the live website. Please submit pull requests to the 'main' branch.
https://mapserver.org
Other
34 stars 69 forks source link

Migration from Travis CI to GitHubActions #862

Closed geographika closed 9 months ago

geographika commented 10 months ago

This pull request migrates the MapServer docs CI from Travis to GitHubActions similar to https://github.com/MapServer/MapServer/pull/6993 in the main MapServer repo. See discussions in https://lists.osgeo.org/pipermail/mapserver-dev/2023-December/017060.html

Once merged there are a 3 steps required to setup the SSH access to allow commits to MapServer-documentation to be automatically pushed to mapserver.github.io. I don't have permissions to set these up, but have documented the steps below and I've run through and tested on my own forks of the two repos and all is working (eventually).

Steps:

  1. Create a new ssh key for deployments - ssh-keygen -t rsa -b 4096 -C "git@github.com"
  2. Add the public key as a new deploy key to the GitHub Pages repo - https://github.com/mapserver/mapserver.github.io/settings/keys/new
  3. Add the private key as a new Actions secret named SSH_PRIVATE_KEY - https://github.com/mapserver/MapServer-documentation/settings/secrets/actions

Note (for reference) when renaming shell scripts GHA has "Permission Denied" errors. The git fix for this on Windows is:

git update-index --chmod=+x .\ci_build_docs.sh
git update-index --chmod=+x .\ci_deploy_website.sh
rouault commented 10 months ago

Steps: Create a new ssh key for deployments - ssh-keygen -t rsa -b 4096 -C "git@github.com" Add the public key as a new deploy key to the GitHub Pages repo - https://github.com/mapserver/mapserver.github.io/settings/keys/new Add the private key as a new Actions secret named SSH_PRIVATE_KEY - https://github.com/mapserver/MapServer-documentation/settings/secrets/actions

I just did them

geographika commented 10 months ago

Thanks @rouault !

rouault commented 9 months ago

Merging

github-actions[bot] commented 9 months ago

The backport to branch-8-0 failed:

The process '/usr/bin/git' failed with exit code 1
stderr ``` error: could not apply e5152e41... Migration to GHA hint: After resolving the conflicts, mark them with hint: "git add/rm ", then run hint: "git cherry-pick --continue". hint: You can instead skip this commit with "git cherry-pick --skip". hint: To abort and get back to the state before "git cherry-pick", hint: run "git cherry-pick --abort". ```
stdout ``` CONFLICT (modify/delete): .travis.yml deleted in e5152e41 (Migration to GHA) and modified in HEAD. Version HEAD of .travis.yml left in tree. ```

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-branch-8-0 branch-8-0
# Navigate to the new working tree
cd .worktrees/backport-branch-8-0
# Create a new branch
git switch --create backport-862-to-branch-8-0
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick e5152e4158073e7ab241269f6eac714230c83548,42b24dc4fbb27a4ea3cab602c2868e14ec6ff12c
# Push it to GitHub
git push --set-upstream origin backport-862-to-branch-8-0
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-branch-8-0

Then, create a pull request where the base branch is branch-8-0 and the compare/head branch is backport-862-to-branch-8-0.