Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/build-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build from push
on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.141.0
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Build site
uses: omsf/static-site-tools/build/hugo@main
with:
base-url: ""

- name: Make artifact
shell: bash
run: tar czf site.tar.gz public

- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: site-build
path: site.tar.gz
if-no-files-found: error
retention-days: 1
21 changes: 21 additions & 0 deletions .github/workflows/prod-cloudflare.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Deploy to production

on:
workflow_run:
workflows: ["Build from push"]
types:
- completed
branches:
- main

jobs:
deploy-to-prod:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
uses: omsf/static-site-tools/.github/workflows/prod-cloudflare.yaml@main
with:
run-id: ${{ github.event.workflow_run.id }}
project-name: ${{ vars.CLOUDFLARE_PROJECT_NAME }}
html-dir: public
secrets:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
Loading