fix script #7
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: | |
push: | |
branches: | |
- action | |
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 auth | |
cld upload_folder ${GITHUB_WORKSPACE}/src/ --recursive true | |
echo "Upload to Cloudinary completed successfully." | |
env: | |
CLOUDINARY_URL: ${{ secrets.CLOUDINARY_URL }} |