Update README.md #25
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: Build | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
name: Deploy | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: npm install | |
- name: Install Wrangler | |
run: npm i @cloudflare/wrangler -g | |
- name: Publish to Cloudflare | |
run: | | |
echo '${{ secrets.WRANGLER }}' > wrangler.toml | |
wrangler publish | |
env: | |
CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }} | |
- name: Release Build Script | |
run: | | |
cd worker | |
git init | |
git add * | |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git commit -m "Auto build" -a | |
git push --force --quiet "https://${GITHUB_ACTOR}:${{ github.token }}@github.com/${GITHUB_REPOSITORY}.git" master:build |