@@ -0,0 +1,80 @@
1+name: Deploy Sphinx
2+on:
3+ workflow_dispatch:
4+ inputs:
5+ tag:
6+ type: string
7+ required: false
8+ default: master
9+ description: Enter the tag to deploy
10+ push:
11+ branches:
12+ - 'master'
13+jobs:
14+ build-frontend:
15+ runs-on: ubuntu-latest
16+ name: 'Build Frontend'
17+ steps:
18+ - uses: actions/checkout@v3
19+ with:
20+ ref: ${{ github.event.inputs.tag }}
21+ - uses: actions/setup-node@v3
22+ with:
23+ node-version-file: ./ui/.nvmrc
24+ - working-directory: ./ui
25+ run: |
26+ npm ci
27+ npm run build
28+ - uses: actions/upload-artifact@v3
29+ with:
30+ name: 'ui-dist'
31+ path: ui/dist
32+ glob:
33+ runs-on: ubuntu-latest
34+ name: 'Make a glob'
35+ needs: build-frontend
36+ steps:
37+ - uses: actions/checkout@v3
38+ with:
39+ ref: ${{ github.event.inputs.tag }}
40+ - uses: actions/download-artifact@v3
41+ with:
42+ name: 'ui-dist'
43+ path: ui/dist
44+ - name: 'glob'
45+ uses: ./.github/actions/glob
46+ with:
47+ folder: 'ui/dist/*'
48+ docket: 'desk/desk.docket-0'
49+ - name: Commit and Push Glob
50+ run: |
51+ git config --global user.name github-actions
52+ git config --global user.email github-actions@github.com
53+ git add desk/desk.docket-0
54+ git commit -n -m "update glob: ${{ steps.glob.outputs.hash }} [skip actions]" || echo "No changes to commit"
55+ INPUT=${{ github.event.inputs.tag }}
56+ BRANCH=${INPUT:-"master"}
57+ git pull origin $BRANCH --rebase --autostash
58+ git push
59+ # deploy:
60+ # runs-on: ubuntu-latest
61+ # needs: glob
62+ # name: "Deploy sphinx to live"
63+ # steps:
64+ # - uses: actions/checkout@v3
65+ # with:
66+ # ref: ${{ github.event.inputs.tag }}
67+ # - id: 'auth'
68+ # uses: 'google-github-actions/auth@v1'
69+ # with:
70+ # credentials_json: '${{ secrets.JANEWAY_SERVICE_KEY }}'
71+ # - name: 'Set up Cloud SDK'
72+ # uses: 'google-github-actions/setup-gcloud@v1'
73+ # - id: deploy
74+ # name: Deploy
75+ # run:
76+ # ./.github/helpers/deploy.sh tloncorp/landscape-apps groups wannec-dozzod-marzod us-west1-b ${{ github.event.inputs.tag }}
77+ # env:
78+ # SSH_SEC_KEY: ${{ secrets.JANEWAY_SSH_SEC_KEY }}
79+ # SSH_PUB_KEY: ${{ secrets.JANEWAY_SSH_PUB_KEY }}
80+ # URBIT_REPO_TAG: ${{ vars.URBIT_REPO_TAG }}