diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7013c2bb..96a54bec 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -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 }}