From 61bbefff8cb10cc5c6124db545c82fa131b72954 Mon Sep 17 00:00:00 2001 From: Fabien Basmaison Date: Sat, 6 Dec 2025 00:44:36 +0100 Subject: [PATCH 1/2] chore: Deploy to self-hosted prod. --- .github/workflows/deploy-prod.yml | 37 +++++++++++++++++++++++++++++++ CNAME | 1 - 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/deploy-prod.yml delete mode 100644 CNAME diff --git a/.github/workflows/deploy-prod.yml b/.github/workflows/deploy-prod.yml new file mode 100644 index 00000000..96246db3 --- /dev/null +++ b/.github/workflows/deploy-prod.yml @@ -0,0 +1,37 @@ +name: Deploy Eleventy on prod via rsync + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + build: + runs-on: ubuntu-olatest + steps: + # Check-out the repository under $GITHUB_WORKSPACE. + - uses: actions/checkout@master + + - name: Install dependencies. + run: npm ci + + - name: Lint with fix. + run: npx eslint --fix + + # Build the website with Eleventy. + - name: Build Eleventy. + run: npm run build + + # Rsync files via SSH. + - name: Sync files with server. + uses: burnett01/rsync-deployments@master + with: + switches: -rlD --delete --exclude='.htaccess' + path: _site/ + remote_path: ${{ secrets.REMOTE_PATH_PROD }} + remote_host: ${{ secrets.REMOTE_HOST }} + remote_port: ${{ secrets.REMOTE_PORT }} + remote_user: ${{ secrets.REMOTE_USER }} + remote_key: ${{ secrets.REMOTE_PRIVATE_KEY }} + remote_key_pass: ${{ secrets.REMOTE_PRIVATE_KEY_PASS }} diff --git a/CNAME b/CNAME deleted file mode 100644 index 3af0eb55..00000000 --- a/CNAME +++ /dev/null @@ -1 +0,0 @@ -css-naked-day.org \ No newline at end of file From eaa3a4c2a18d02917410af18ef6f6576519d67aa Mon Sep 17 00:00:00 2001 From: Fabien Basmaison Date: Sun, 7 Dec 2025 11:20:28 +0100 Subject: [PATCH 2/2] chore: Differentiate secrets between Staging and Prod. --- .github/workflows/deploy-prod.yml | 10 +++++----- .github/workflows/deploy-staging.yml | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/deploy-prod.yml b/.github/workflows/deploy-prod.yml index 96246db3..afa15910 100644 --- a/.github/workflows/deploy-prod.yml +++ b/.github/workflows/deploy-prod.yml @@ -30,8 +30,8 @@ jobs: switches: -rlD --delete --exclude='.htaccess' path: _site/ remote_path: ${{ secrets.REMOTE_PATH_PROD }} - remote_host: ${{ secrets.REMOTE_HOST }} - remote_port: ${{ secrets.REMOTE_PORT }} - remote_user: ${{ secrets.REMOTE_USER }} - remote_key: ${{ secrets.REMOTE_PRIVATE_KEY }} - remote_key_pass: ${{ secrets.REMOTE_PRIVATE_KEY_PASS }} + remote_host: ${{ secrets.REMOTE_HOST_PROD }} + remote_port: ${{ secrets.REMOTE_PORT_PROD }} + remote_user: ${{ secrets.REMOTE_USER_PROD }} + remote_key: ${{ secrets.REMOTE_PRIVATE_KEY_PROD }} + remote_key_pass: ${{ secrets.REMOTE_PRIVATE_KEY_PASS_PROD }} diff --git a/.github/workflows/deploy-staging.yml b/.github/workflows/deploy-staging.yml index 0099b9c1..ef95a8cc 100644 --- a/.github/workflows/deploy-staging.yml +++ b/.github/workflows/deploy-staging.yml @@ -30,8 +30,8 @@ jobs: switches: -rlD --delete --exclude='.htaccess' path: _site/ remote_path: ${{ secrets.REMOTE_PATH_STAGING }} - remote_host: ${{ secrets.REMOTE_HOST }} - remote_port: ${{ secrets.REMOTE_PORT }} - remote_user: ${{ secrets.REMOTE_USER }} - remote_key: ${{ secrets.REMOTE_PRIVATE_KEY }} - remote_key_pass: ${{ secrets.REMOTE_PRIVATE_KEY_PASS }} + remote_host: ${{ secrets.REMOTE_HOST_STAGING }} + remote_port: ${{ secrets.REMOTE_PORT_STAGING }} + remote_user: ${{ secrets.REMOTE_USER_STAGING }} + remote_key: ${{ secrets.REMOTE_PRIVATE_KEY_STAGING }} + remote_key_pass: ${{ secrets.REMOTE_PRIVATE_KEY_PASS_STAGING }}