Skip to content

Commit

Permalink
Merge branch 'master' of github.com:tloncorp/landscape
Browse files Browse the repository at this point in the history
  • Loading branch information
arthyn committed Aug 14, 2023
2 parents 3a8d9ad + fc6b16e commit 449668a
Showing 1 changed file with 86 additions and 0 deletions.
86 changes: 86 additions & 0 deletions .github/workflows/deploy-kernel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Deploy Landscape (Kernel Integration)
on:
workflow_dispatch:
inputs:
tag:
type: string
required: false
default: master
description: Enter the tag to deploy
jobs:
build-frontend:
runs-on: ubuntu-latest
name: 'Build Frontend'
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.REPO_TOKEN }}
ref: ${{ github.event.inputs.tag }}
- uses: actions/setup-node@v3
with:
node-version-file: ./ui/.nvmrc
- working-directory: ./ui
run: |
npm ci
npm run build
- uses: actions/upload-artifact@v3
with:
name: 'ui-dist'
path: ui/dist
glob:
runs-on: ubuntu-latest
name: 'Make a glob'
needs: build-frontend
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.REPO_TOKEN }}
ref: ${{ github.event.inputs.tag }}
- uses: actions/download-artifact@v3
with:
name: 'ui-dist'
path: ui/dist
- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.GCP_SERVICE_KEY }}'
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v1'
- name: 'glob'
uses: ./.github/actions/glob
with:
folder: 'ui/dist/*'
docket: 'desk/desk.docket-0'
- name: Commit and Push Glob
run: |
git config --global user.name github-actions
git config --global user.email github-actions@github.com
git add desk/desk.docket-0
git commit -n -m "update glob: ${{ steps.glob.outputs.hash }} [skip actions]" || echo "No changes to commit"
INPUT=${{ github.event.inputs.tag }}
BRANCH=${INPUT:-"master"}
git pull origin $BRANCH --rebase --autostash
git push
deploy:
runs-on: ubuntu-latest
needs: glob
name: "Deploy a glob to ~bosdev-dozzod-marnus (kernel integration)"
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.REPO_TOKEN }}
ref: ${{ github.event.inputs.tag }}
- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.GCP_SERVICE_KEY }}'
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v1'
- id: deploy
name: Deploy
run:
./.github/helpers/deploy.sh tloncorp/landscape landscape bosdev-dozzod-marnus us-central1-b mainnet-tlon-other-2d ${{ github.event.inputs.tag }}
env:
SSH_SEC_KEY: ${{ secrets.GCP_SSH_SEC_KEY }}
SSH_PUB_KEY: ${{ secrets.GCP_SSH_PUB_KEY }}
URBIT_REPO_TAG: ${{ vars.URBIT_REPO_TAG_KERNEL }}

0 comments on commit 449668a

Please sign in to comment.