linkie/.github/workflows/main.yml

42 lines
965 B
YAML
Raw Normal View History

on:
repository_dispatch:
push:
branches:
- main
jobs:
deploy:
2023-09-16 21:19:04 +00:00
runs-on: ubuntu-latest
name: Deploy
2023-09-16 20:44:48 +00:00
environment: Cloudflare Worker
steps:
- uses: actions/checkout@master
- name: Publish
2023-09-16 20:38:07 +00:00
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
secrets: |
AUTH_KEY
env:
AUTH_KEY: ${{ secrets.AUTH_KEY }}
2023-09-16 21:19:04 +00:00
test:
runs-on: ubuntu-latest
name: Test
environment: Cloudflare Worker
steps:
- uses: actions/checkout@master
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests
- name: Test
env:
HOST: ${{ vars.DEPLOY_HOST }}
AUTH_KEY: ${{ secrets.AUTH_KEY }}
run:
python test.py