Skip to content

Commit

Permalink
Deploy Cloudflare workers
Browse files Browse the repository at this point in the history
  • Loading branch information
jonassimoen authored Jan 16, 2024
1 parent cc48006 commit d6d8ad4
Showing 1 changed file with 5 additions and 22 deletions.
27 changes: 5 additions & 22 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,10 @@ on:
jobs:
build-deploy:
runs-on: ubuntu-latest
env:
NODE_OPTIONS: --max_old_space_size=1536
DATABASE_URL: ${{ secrets.DATABASE_URL }}
EXTERNAL_API_KEY: ${{ secrets.EXTERNAL_API_KEY }}
OAUTH_GOOGLE_CLIENT_ID: ${{ secrets.OAUTH_GOOGLE_CLIENT_ID }}
OAUTH_GOOGLE_CLIENT_SECRET: ${{ secrets.OAUTH_GOOGLE_CLIENT_SECRET }}
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
PUBLIC_KEY: ${{ secrets.PUBLIC_KEY }}

name: Deploy
steps:
- name: SSH and deploy node app
uses: appleboy/ssh-action@master
- uses: actions/checkout@v3
- name: Deploy
uses: cloudflare/wrangler-action@v3
with:
host: ${{ secrets.SERVER_IP }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_KEY }}
port: 22
script: |
cd /var/www/html/fantasy-api.simoen.tech
rm yarn.lock package-lock.json
git pull origin master
yarn install
yarn build
pm2 restart edd-API --update-env
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}

0 comments on commit d6d8ad4

Please sign in to comment.