Add web page publishing script
OSCW Runner Container Build / OSCW-Runner-Container (push) Successful in 7m8s Details

This commit is contained in:
Rafal Kupiec 2023-11-30 23:17:27 +01:00
parent 8a146d6441
commit cb59223d22
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
2 changed files with 18 additions and 0 deletions

View File

@ -42,6 +42,10 @@ RUN chmod a+x /usr/local/bin/github_publish
COPY files/artifact_publish /usr/local/bin/
RUN chmod a+x /usr/local/bin/artifact_publish
# Install webpage publishing script
COPY files/webpage_publish /usr/local/bin/
RUN chmod a+x /usr/local/bin/webpage_publish
# Set system path
ENV PATH="/opt/xtchain:/opt/xtchain/bin:${PATH}"

14
files/webpage_publish Normal file
View File

@ -0,0 +1,14 @@
#!/bin/bash
SOURCE="${1}"
if [ ${GITHUB_ACTIONS} ] ; then
[ -z ${CI_COMMIT_REF} ] && CI_COMMIT_REF="${GITHUB_REF}"
fi
echo "Publishing CI/CD artifacts for '${CI_COMMIT_REF}'"
echo "$OSCW_ARTIFACTS_USERKEY" | base64 -d > ~/artifacts.key
chmod 600 ~/artifacts.key
scp -o StrictHostKeyChecking=no -i ~/artifacts.key ${SOURCE} $OSCW_ARTIFACTS_USERNAME@$OSCW_ARTIFACTS_HOSTNAME:webpage/