add support for gallery page #68
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
name: Deploy | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
deploy: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- env: | |
HASADNA_CKAN_CLOUD_DOCKER_DEPLOY_KEY: ${{ secrets.HASADNA_CKAN_CLOUD_DOCKER_DEPLOY_KEY }} | |
TRANSIFEX_API_TOKEN: ${{ secrets.TRANSIFEX_API_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
PUSH_TRANSLATIONS_IMAGE: "ghcr.io/hasadna/ckanext-datacity/push-translations:latest" | |
run: | | |
echo "${GITHUB_TOKEN}" | docker login ghcr.io -u hasadna --password-stdin &&\ | |
if docker pull "${PUSH_TRANSLATIONS_IMAGE}"; then | |
CACHE_FROM_ARG="--cache-from ${PUSH_TRANSLATIONS_IMAGE}" | |
else | |
CACHE_FROM_ARG="" | |
fi &&\ | |
docker build $CACHE_FROM_ARG --build-arg VERSION=${GITHUB_SHA} -t "${PUSH_TRANSLATIONS_IMAGE}" bin/push_source_translations &&\ | |
docker push "${PUSH_TRANSLATIONS_IMAGE}" &&\ | |
docker run -v $(pwd):/opt/ckanext-datacity -e TRANSIFEX_API_TOKEN "${PUSH_TRANSLATIONS_IMAGE}" &&\ | |
if ! git log -1 --pretty=format:"%s" | grep -- --no-deploy; then | |
cd `mktemp -d` &&\ | |
echo "${HASADNA_CKAN_CLOUD_DOCKER_DEPLOY_KEY}" > deploy_key &&\ | |
chmod 400 deploy_key &&\ | |
export GIT_SSH_COMMAND="ssh -i `pwd`/deploy_key -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" &&\ | |
git clone git@github.com:hasadna/ckan-cloud-docker.git &&\ | |
cd ckan-cloud-docker &&\ | |
echo '-e "git+https://github.com/hasadna/ckanext-datacity.git@'${GITHUB_SHA}'#egg=ckanext-datacity"' > ckan/requirements-ckanext-datacity.txt &&\ | |
git config --global user.name "ckanext-datacity CI" &&\ | |
git config --global user.email "ckanext-datacity-ci@localhost" &&\ | |
git add ckan/requirements-ckanext-datacity.txt && git commit -m "automatic update of ckanext-datacity" &&\ | |
git push origin master | |
fi |