Skip to content

Update front page and .htaccess #753

Update front page and .htaccess

Update front page and .htaccess #753

name: Delete deployed PR from S3
on:
pull_request:
types: [closed]
branches: [main]
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
jobs:
delete_deployed_pr:
# Fix to ubuntu 22.04. In 2027, at the EOL of that distro, this GH warning will have to be addressed:
# The current runner (ubuntu-24.04-x64) was detected as self-hosted because the platform does not match a GitHub-hosted runner image (or that image is deprecated and no longer supported).
# In such a case, you should install Ruby in the $RUNNER_TOOL_CACHE yourself, for example using https://github.com/rbenv/ruby-build
# You can take inspiration from this workflow for more details: https://github.com/ruby/ruby-builder/blob/master/.github/workflows/build.yml
# $ ruby-build 3.1.4 /opt/hostedtoolcache/Ruby/3.1.4/x64
# Once that completes successfully, mark it as complete with:
# $ touch /opt/hostedtoolcache/Ruby/3.1.4/x64.complete
# It is your responsibility to ensure installing Ruby like that is not done in parallel.
runs-on: ubuntu-22.04
# PRs are only deployed if the PR branch is not in a fork
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
steps:
- name: Install AWS CLI
run: |
python -m pip install --upgrade pip
pip install awscli==1.36.40
- name: Clear the PR dir on S3
run: aws --endpoint-url https://s3.cern.ch s3 rm --recursive s3://root/${PR_NUMBER:?}
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: "eu-west-1"
- name: Install Kerberos utilities
run: sudo apt-get install -y krb5-user
- name: Install XRootD client
run: sudo apt-get -y install xrootd-client
- name: Clear the PR dir on EOS
env:
RWEBEOS_KT: ${{ secrets.RWEBEOS_KT }}
KT_FILE_NAME: /tmp/decoded.keytab
EOS_PATH: /eos/project/r/root-eos/website
EOS_ENDPOINT: root://eosproject-r.cern.ch
KRB5CCNAME: /tmp/krb5cc
run: |
echo ${RWEBEOS_KT} | base64 -d > ${KT_FILE_NAME}
kinit -p ${{ secrets.KRB5USER }}@${{ secrets.KRB5REALM }} -kt ${KT_FILE_NAME}
xrdfs ${EOS_ENDPOINT} mv ${EOS_PATH}/${PR_NUMBER:-?} ${EOS_PATH}/recycle/${PR_NUMBER:-?}