Skip to content

feat: Adds terraform default tags post (#35) #18

feat: Adds terraform default tags post (#35)

feat: Adds terraform default tags post (#35) #18

Workflow file for this run

name: Live
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.121.1
steps:
- uses: actions/setup-node@v4
with:
node-version: 16
- name: Install Hugo CLI
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- run: npm ci
- run: hugo
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: build
path: public
deploy:
concurrency:
group: live
cancel-in-progress: true
environment:
name: live
url: https://leolleo.dev
runs-on: ubuntu-latest
needs:
- build
steps:
- name: Downloads artifact
uses: actions/download-artifact@v4
with:
name: build
path: public
- name: Publish app
uses: cloudflare/[email protected]
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
command: pages deploy --branch main --project-name blog ./public
- name: Purge cloudflare cache
run: |
curl -X POST "https://api.cloudflare.com/client/v4/zones/a5f4d54fc54af37e05218d9b4e8cd4d9/purge_cache" \
-H "Authorization: Bearer ${{ secrets.CF_API_TOKEN }}" \
-H "Content-Type: application/json" \
--data '{"purge_everything":true}'