on 032a699 help sign in
82 lines 2.5 kB history raw
1name: Deploy Sphinx
2on:
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'
13jobs:
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 access_key: ${{ secrets.S3_ACCESS_KEY }}
50 secret_key: ${{ secrets.S3_SECRET_KEY }}
51 - name: Commit and Push Glob
52 run: |
53 git config --global user.name github-actions
54 git config --global user.email github-actions@github.com
55 git add desk/desk.docket-0
56 git commit -n -m "update glob: ${{ steps.glob.outputs.hash }} [skip actions]" || echo "No changes to commit"
57 INPUT=${{ github.event.inputs.tag }}
58 BRANCH=${INPUT:-"master"}
59 git pull origin $BRANCH --rebase --autostash
60 git push
61 # deploy:
62 # runs-on: ubuntu-latest
63 # needs: glob
64 # name: "Deploy sphinx to live"
65 # steps:
66 # - uses: actions/checkout@v3
67 # with:
68 # ref: ${{ github.event.inputs.tag }}
69 # - id: 'auth'
70 # uses: 'google-github-actions/auth@v1'
71 # with:
72 # credentials_json: '${{ secrets.JANEWAY_SERVICE_KEY }}'
73 # - name: 'Set up Cloud SDK'
74 # uses: 'google-github-actions/setup-gcloud@v1'
75 # - id: deploy
76 # name: Deploy
77 # run:
78 # ./.github/helpers/deploy.sh tloncorp/landscape-apps groups wannec-dozzod-marzod us-west1-b ${{ github.event.inputs.tag }}
79 # env:
80 # SSH_SEC_KEY: ${{ secrets.JANEWAY_SSH_SEC_KEY }}
81 # SSH_PUB_KEY: ${{ secrets.JANEWAY_SSH_PUB_KEY }}
82 # URBIT_REPO_TAG: ${{ vars.URBIT_REPO_TAG }}