changed deploy.yml #8
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: Python CI/CD | |
on: | |
push: | |
branches: | |
- master # Change this to your main branch name if different | |
pull_request: | |
branches: | |
- master # Change this to your main branch name if different | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.8] # Add more Python versions as needed | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python3 -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Build and package | |
run: | | |
python3 setup.py sdist bdist_wheel | |
- name: Upload package to GitHub Releases | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: ./dist/* | |
asset_name: geopkg_size_reducer-${{ github.sha }}.tar.gz | |
asset_content_type: application/gzip | |
- name: Clean up | |
run: | | |
rm -rf ./dist | |
rm -rf ./build | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Decompress files | |
run: python decompression.py # Adjust based on your decompression script | |
- name: Merge files | |
run: python integrater.py # Adjust based on your merging script | |
- name: Compress files | |
run: python compression.py # Adjust based on your compression script | |
- name: Deploy to production | |
# Add your deployment steps here, like deploying to a server or cloud platform | |
run: echo "Deploying to production..." |