-
Notifications
You must be signed in to change notification settings - Fork 12
44 lines (37 loc) · 1.28 KB
/
deploy-guessing-game-v2.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Deploy Number Guessing Game v2
on:
workflow_dispatch:
inputs:
address:
description: "Contract Address"
required: true
competition_address:
description: "Competition Contract Address"
required: true
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "18"
- name: Install dependencies
run: npm install
working-directory: ./guessing-game-v2
- name: Write Address to JSON
run: |
echo '{"address": "${{ github.event.inputs.address }}"}' > ./guessing-game-v2/src/assets/contract/address.json
echo '{"competition_address": "${{ github.event.inputs.competition_address }}"}' > ./guessing-game-v2/src/assets/contract/competition_address.json
- name: Build application
run: npm run build
working-directory: ./guessing-game-v2
env: # Or as an environment variable
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./guessing-game-v2/dist
destination_dir: ./guessing-game-v2