diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 09e9bf7..4a3d212 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -9,12 +9,21 @@ jobs: deploy: runs-on: ubuntu-latest if: "!contains(github.event.head_commit.message, '[skip ci]')" + env: + CF_ZONE_ID: "92e2ec634800f776ec4f3e983491c349" + CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }} steps: - uses: actions/checkout@v2 - - uses: cloudflare/wrangler-action@master + - uses: actions/setup-node@v1 with: - apiToken: ${{ secrets.CF_API_TOKEN }} - - uses: jakejarvis/cloudflare-purge-action@master - env: - CLOUDFLARE_ZONE: "92e2ec634800f776ec4f3e983491c349" - CLOUDFLARE_TOKEN: ${{ secrets.CF_API_TOKEN }} + node-version: 12 + - run: | + mkdir -p $HOME/.wrangler + chmod -R 770 $HOME/.wrangler + - run: npm install --global @cloudflare/wrangler + - run: wrangler publish + - run: | + curl -X POST "https://api.cloudflare.com/client/v4/zones/$CF_ZONE_ID/purge_cache" \ + -H "Content-Type: application/json" \ + -H "Authorization: Bearer $CF_API_TOKEN" \ + --data '{"purge_everything":true}' diff --git a/README.md b/README.md index 0d8ec7c..12492d5 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # 💾 [y2k.lol](https://y2k.lol/) +![Deploy](https://github.com/jakejarvis/y2k/workflows/Deploy/badge.svg) + Nostalgic time machine powered by on-demand Windows Me VMs and [my first website](https://jarv.is/y2k/). Inspired by [charlie.bz](https://charlie.bz/) (and quarantine boredom). The backend isn't quite ready to be open-sourced (read: it's still a fatally embarrassing ball of spaghetti) but will be moved here very soon! 🍝