Fix up CI for deployments
This commit is contained in:
parent
419425c8f2
commit
0209318904
@ -1,23 +1,9 @@
|
|||||||
name: Build & Deploy Site
|
name: Deploy ewpratten.com
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
|
||||||
jobs:
|
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:
|
build_dev:
|
||||||
name: Development Build
|
name: Development Build
|
||||||
@ -38,19 +24,10 @@ jobs:
|
|||||||
- name: Build only
|
- name: Build only
|
||||||
uses: shalzz/zola-deploy-action@v0.19.1
|
uses: shalzz/zola-deploy-action@v0.19.1
|
||||||
env:
|
env:
|
||||||
|
BUILD_DIR: ./ewpratten.com
|
||||||
BUILD_ONLY: true
|
BUILD_ONLY: true
|
||||||
BUILD_FLAGS: --drafts
|
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:
|
build_prod:
|
||||||
name: Production Build
|
name: Production Build
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master'
|
||||||
@ -70,6 +47,7 @@ jobs:
|
|||||||
- name: Build only
|
- name: Build only
|
||||||
uses: shalzz/zola-deploy-action@v0.19.1
|
uses: shalzz/zola-deploy-action@v0.19.1
|
||||||
env:
|
env:
|
||||||
|
BUILD_DIR: ./ewpratten.com
|
||||||
BUILD_ONLY: true
|
BUILD_ONLY: true
|
||||||
|
|
||||||
- name: Publish to Cloudflare Pages
|
- name: Publish to Cloudflare Pages
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -9,7 +9,7 @@ Cargo.lock
|
|||||||
# These are backup files generated by rustfmt
|
# These are backup files generated by rustfmt
|
||||||
**/*.rs.bk
|
**/*.rs.bk
|
||||||
|
|
||||||
/public/
|
/*/public/
|
||||||
|
|
||||||
/node_modules/
|
/node_modules/
|
||||||
|
|
||||||
|
28
.vscode/tasks.json
vendored
28
.vscode/tasks.json
vendored
@ -4,9 +4,12 @@
|
|||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"tasks": [
|
"tasks": [
|
||||||
{
|
{
|
||||||
"label": "Launch development webserver",
|
"label": "Launch development webserver (ewpratten.com)",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": "zola",
|
"command": "zola",
|
||||||
|
"options": {
|
||||||
|
"cwd": "${workspaceFolder}/ewpratten.com"
|
||||||
|
},
|
||||||
"args": [
|
"args": [
|
||||||
"serve",
|
"serve",
|
||||||
"--drafts",
|
"--drafts",
|
||||||
@ -15,29 +18,6 @@
|
|||||||
"--open"
|
"--open"
|
||||||
],
|
],
|
||||||
"problemMatcher": []
|
"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": []
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user