github: migrate prod to wrangler-action [deploy]

This commit is contained in:
Harsh Shandilya 2021-12-22 10:42:00 +05:30
parent 6dd2d54f74
commit e40be3511a
1 changed files with 4 additions and 9 deletions

View File

@ -30,17 +30,12 @@ jobs:
hugo --minify --gc
- name: Publish to Cloudflare Workers Sites
run: |
echo "prefix = \"${HOME}\"" > ~/.npmrc
npm install -g @cloudflare/wrangler
mkdir -p ~/.wrangler/config/
echo "api_token=\"${CF_API_TOKEN}\"" > ~/.wrangler/config/default.toml
~/bin/wrangler publish --env production
uses: cloudflare/wrangler-action@1.3.0
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
environment: 'production'
env:
SECRETS_ENC_KEY: ${{ secrets.SECRETS_ENC_KEY }}
CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
CF_ZONE_ID: ${{ secrets.CF_ZONE_ID }}
CF_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
deploy-staging:
if: "contains(github.event.head_commit.message, '[staging]')"