Skip to content

feat(post): A terraformed kubernetes local lab #73

feat(post): A terraformed kubernetes local lab

feat(post): A terraformed kubernetes local lab #73

Workflow file for this run

name: PR
on:
pull_request:
branches:
- main
types:
- opened
- reopened
- synchronize
- ready_for_review
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 --config config.pr.toml
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: build
path: public
deploy:
concurrency:
group: pr-${{ github.even.number }}
cancel-in-progress: true
environment:
name: pr-${{ github.event.number }}
url: https://pr-${{ github.event.number }}.garden-cbf.pages.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 pr-${{ github.event.number }} --project-name blog ./public