name: Deploy
on:
  push:
    branches: [ main ]
jobs:
  build:
    runs-on: ubuntu-latest
    env: 
      HUGO_VERSION: "0.73.0"
    steps:
      - name: Checkout repo and submodule
        uses: actions/checkout@v2
        with:
          submodules: recursive
      - name: Install Hugo
        run: curl -LO https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-64bit.deb && sudo dpkg -i hugo_${HUGO_VERSION}_Linux-64bit.deb
      - name: Install rclone
        run: curl https://rclone.org/install.sh | sudo bash
      - name: Build
        run: hugo -d www/
      - name: Deploy
        env:
          WEBDAV_PASSWORD: ${{ secrets.WEBDAV_PASSWORD }}
        run: rclone copy www fastmail:b.bjgill.net/files/website -v --webdav-pass "${WEBDAV_PASSWORD}" --config rclone.conf

name: Deploy
on:
  push:
    branches: [ main ]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repo and submodule
        uses: actions/checkout@v2
        with:
          submodules: recursive
      - name: Install Hugo
        env: 
          HUGO_VERSION: "0.73.0"
        run: curl -LO https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-64bit.deb && sudo dpkg -i hugo_${HUGO_VERSION}_Linux-64bit.deb
      - name: Install rclone
        run: curl https://rclone.org/install.sh | sudo bash
      - name: Build
        run: hugo -d www/
      - name: Deploy
        env:
          WEBDAV_PASSWORD: ${{ secrets.WEBDAV_PASSWORD }}
        run: rclone copy www fastmail:b.bjgill.net/files/website -v --webdav-pass "${WEBDAV_PASSWORD}" --config rclone.conf

Load hugo env variable only where needed
Load hugo env variable only where needed
