workflows: update #41
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: Deploy to Cloudflare Workers Sites | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy-main: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v2 | |
- name: Setup Latest Version of Hugo | |
uses: peaceiris/actions-hugo@2e89aa66d0093e4cd14751b3028fc1a179452c2e | |
with: | |
hugo-version: 'latest' | |
extended: true | |
- name: Build Hugo Site | |
run: | | |
hugo --minify --gc | |
- name: Deploy to Cloudflare | |
run: | | |
npm install -g wrangler | |
wrangler deploy | |
env: | |
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }} | |
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} |