forked from MyEtherWallet/MyEtherWallet
-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (39 loc) · 1.41 KB
/
deploy-to-ghpages.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
45
46
47
name: deploy to gh-pages [v6]
on:
push:
tags:
- 'v6.*'
jobs:
gh-pages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: main
- name: verify tag
run: |
git branch --contains $GITHUB_SHA | sed -e 's/^[ \t *]*//' | grep '^main$'
git checkout $GITHUB_SHA
- name: setup env
id: node-version
run: |
docker build -t mew-build-container .
echo ::set-output name=NODE_VERSION::$(docker run --rm -v `pwd`:/home:rw mew-build-container /bin/bash -c "node --version")
- name: Cache node modules
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-node-${{steps.node-version.outputs.NODE_VERSION}}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{steps.node-version.outputs.NODE_VERSION}}-
- name: npm install
run: docker run --rm -v `pwd`:/home:rw --user "$(id -u):$(id -g)" mew-build-container /bin/bash -c "npm install"
- name: build
run: docker run --rm -v `pwd`:/home:rw mew-build-container /bin/bash -c "npm run build:hash"
- name: deploy to gh-pages
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
ACCESS_TOKEN: ${{ secrets.MEW_BOT_TOKEN }}
BRANCH: gh-pages
FOLDER: dist
CLEAN: true