Merge branch 'berachain:main' into main #1
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 to Cloudinary | |
on: | |
merge_group: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
# Set up Python environment | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.x" # Ensure the required Python version is installed | |
# Install Cloudinary CLI using pip3 | |
- name: Install Cloudinary CLI | |
run: pip3 install cloudinary-cli | |
# Configure Cloudinary Environment Variables | |
- name: Configure Cloudinary Environment | |
run: | | |
echo "CLOUDINARY_URL=cloudinary://${{ secrets.CLOUDINARY_API_KEY }}:${{ secrets.CLOUDINARY_API_SECRET }}@${{ secrets.CLOUDINARY_CLOUD_NAME }}" >> $GITHUB_ENV | |
# Authenticate and Upload to Cloudinary | |
- name: Upload to Cloudinary | |
run: | | |
set -e # Ensure the script fails on error | |
cld upload_dir ${GITHUB_WORKSPACE}/src/ -o overwrite true -o use_filename true -o unique_filename false -o use_asset_folder_as_public_id_prefix true -o resource_type raw | |
echo "Upload to Cloudinary completed successfully." | |
env: | |
CLOUDINARY_URL: ${{ secrets.CLOUDINARY_URL }} |