Skip to content

Deploy to live

Deploy to live #55

Workflow file for this run

name: Deploy to live
on:
workflow_dispatch:
schedule:
- cron: "20 04 */1 * *"
concurrency:
group: deploy-prod
cancel-in-progress: true
jobs:
build:
name: Build website
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache-dependency-path: ${{ env.BUILD_PATH }}/package-lock.json
- name: Install dependencies
uses: ./.github/workflows/actions/install-dependencies
- name: Build Eleventy in production mode
run: npm run build-production
- name: Save artifact
uses: actions/upload-artifact@v4
with:
name: bristolfurs-prod
path: _site
retention-days: 1
deploy:
name: Deploy to production
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: bristolfurs-prod
- name: Upload files
uses: SamKirkland/[email protected]
with:
server: ${{ secrets.FTP_HOST }}
username: ${{ secrets.FTP_USER }}
password: ${{ secrets.FTP_PASSWORD }}
server-dir: ${{ secrets.FTP_PRODUCTION_PATH }}
protocol: ftps
port: 21