From 0209318904dd05b6694f2f4c1b6f33bc33073682 Mon Sep 17 00:00:00 2001 From: Evan Pratten Date: Fri, 25 Oct 2024 15:55:30 -0400 Subject: [PATCH] Fix up CI for deployments --- .../{deploy.yml => deploy-ewpratten-com.yml} | 28 ++----------------- .gitignore | 2 +- .vscode/tasks.json | 28 +++---------------- 3 files changed, 8 insertions(+), 50 deletions(-) rename .github/workflows/{deploy.yml => deploy-ewpratten-com.yml} (59%) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy-ewpratten-com.yml similarity index 59% rename from .github/workflows/deploy.yml rename to .github/workflows/deploy-ewpratten-com.yml index 1065ebc..e109eeb 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy-ewpratten-com.yml @@ -1,23 +1,9 @@ -name: Build & Deploy Site +name: Deploy ewpratten.com on: push: jobs: - workflow_note: - name: Workflow Note - runs-on: ubuntu-latest - steps: - - name: Checkout branch - uses: actions/checkout@v4 - - - name: Add a note with info about this workflow - run: | - git config user.name "github-actions[bot]" - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - git fetch origin "refs/notes/*:refs/notes/*" - git notes append -m "GH-Actions-Workflow-Run: ${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}" - git push origin "refs/notes/*:refs/notes/*" build_dev: name: Development Build @@ -38,19 +24,10 @@ jobs: - name: Build only uses: shalzz/zola-deploy-action@v0.19.1 env: + BUILD_DIR: ./ewpratten.com BUILD_ONLY: true BUILD_FLAGS: --drafts - - name: Publish to Cloudflare Pages - uses: cloudflare/pages-action@v1 - with: - apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} - accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - projectName: ewpratten - directory: public - gitHubToken: ${{ secrets.GITHUB_TOKEN }} - wranglerVersion: '2' - build_prod: name: Production Build if: github.ref == 'refs/heads/master' @@ -70,6 +47,7 @@ jobs: - name: Build only uses: shalzz/zola-deploy-action@v0.19.1 env: + BUILD_DIR: ./ewpratten.com BUILD_ONLY: true - name: Publish to Cloudflare Pages diff --git a/.gitignore b/.gitignore index 7587a7d..be54a34 100644 --- a/.gitignore +++ b/.gitignore @@ -9,7 +9,7 @@ Cargo.lock # These are backup files generated by rustfmt **/*.rs.bk -/public/ +/*/public/ /node_modules/ diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 3814f88..7967e49 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -4,9 +4,12 @@ "version": "2.0.0", "tasks": [ { - "label": "Launch development webserver", + "label": "Launch development webserver (ewpratten.com)", "type": "shell", "command": "zola", + "options": { + "cwd": "${workspaceFolder}/ewpratten.com" + }, "args": [ "serve", "--drafts", @@ -15,29 +18,6 @@ "--open" ], "problemMatcher": [] - }, - { - "label": "Launch development webserver (without drafts)", - "type": "shell", - "command": "zola", - "args": [ - "serve", - "--interface", - "0.0.0.0", - "--open" - ], - "problemMatcher": [] - }, - { - "label": "Initialize Python venv", - "type": "shell", - "command": "python3", - "args": [ - "-m", - "venv", - ".venv" - ], - "problemMatcher": [] } ] } \ No newline at end of file