Skip to content

Instantly share code, notes, and snippets.

@emsifa
Created June 6, 2023 11:46
Show Gist options
  • Save emsifa/29233db2145e526769eea33988fb4d42 to your computer and use it in GitHub Desktop.
Save emsifa/29233db2145e526769eea33988fb4d42 to your computer and use it in GitHub Desktop.
Github Action upload zip file to webhook
name: Deploy on Tag
on:
push:
tags:
- '*'
jobs:
deploy:
runs-on: ubuntu-latest
env:
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Bundle repository
run: zip -r bundle.zip .
- name: HTTP Request to webhook
uses: wei/curl@v1
with:
args: -X POST -F "file=@bundle.zip" -F "tag=${{ github.ref }}" -F "key=${{ env.DEPLOY_KEY }}" "https://yoursite.com/webhook"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment