Autodeploy Gemini

This commit is contained in:
JP Hastings-Edrei 2024-06-10 12:37:47 +01:00 committed by GitHub
parent 1dfbc14704
commit 8fef4a5aea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -66,11 +66,19 @@ jobs:
key: ${{ env.cache-name }}
- name: Build site
run: task build
- name: Upload artifact
- name: Upload site artifact
uses: actions/upload-pages-artifact@v1
with:
name: site
path: ./public
- name: Build Gemini capsule
run: task gemini-reduce
- name: Upload capsule artifact
uses: actions/upload-pages-artifact@v1
with:
name: capsule
path: ./public
# Deployment job
deploy:
@ -114,3 +122,21 @@ jobs:
cid: ${{ steps.Publish.outputs.cid }}
token: ${{ secrets.CLOUDFLARE_TOKEN }}
zone: ${{ secrets.CLOUDFLARE_ZONE_ID }}
gemini-deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Prepare for Fly deployment (Gemini)
uses: superfly/flyctl-actions/setup-flyctl@master
- uses: actions/download-artifact@v3
with:
name: capsule
path: ./public
- name: Extract Github Pages artifact
working-directory: ./public
run: tar -xf ./artifact.tar
- name: Deploy Gemini site
run: flyctl deploy --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}