update #15
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 Koyeb Staging | |
on: | |
push: | |
branches: | |
- main # Or your staging branch | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
# Step 1: Checkout the code | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
# Step 2: Install the Koyeb CLI | |
- name: Install Koyeb CLI | |
run: | | |
curl -fsSL https://raw.githubusercontent.com/koyeb/koyeb-cli/master/install.sh | sh | |
echo "Adding Koyeb CLI to PATH" | |
echo "PATH=$HOME/.koyeb/bin:$PATH" >> $GITHUB_ENV | |
# Step 3: Source Updated PATH | |
- name: Update PATH | |
run: | | |
source $GITHUB_ENV | |
echo "PATH after update: $PATH" | |
ls -l $HOME/.koyeb/bin | |
koyeb --version # Verify installation | |
# Step 4: Authenticate with Koyeb | |
- name: Authenticate with Koyeb | |
env: | |
KOYEB_API_TOKEN: ${{ secrets.KOYEB_API_TOKEN }} | |
run: | | |
koyeb login --api-token $KOYEB_API_TOKEN | |
# Step 5: Deploy to Koyeb | |
- name: Deploy to Koyeb | |
env: | |
KOYEB_API_TOKEN: ${{ secrets.KOYEB_API_TOKEN }} | |
run: koyeb apps list |