mirror of
https://github.com/by-jp/www.byjp.me.git
synced 2025-08-09 01:35:56 +01:00
Autodeploy Gemini
This commit is contained in:
parent
1dfbc14704
commit
8fef4a5aea
1 changed files with 27 additions and 1 deletions
28
.github/workflows/publish.yml
vendored
28
.github/workflows/publish.yml
vendored
|
@ -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 }}
|
||||
|
|
Loading…
Reference in a new issue