-
Notifications
You must be signed in to change notification settings - Fork 5
48 lines (39 loc) · 1.37 KB
/
deploy.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
48
name: Deploy to Production
on:
push:
branches:
- main
jobs:
deploy-to-production:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup npm cache
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: npm ci
- name: Check if this should run.
id: check
run: |
[ ! -n "$(find .changeset -name '*.md')" ] &&
echo ::set-output name=continue::yes
- name: Frontity build
run: npx frontity build --publicPath="https://woocommerce-proof-of-concept.vercel.app/static"
- name: Deploy to Vercel
if: steps.check.outputs.continue == 'yes'
run: npx vercel --prod --confirm --token $VERCEL_TOKEN --scope frontity
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
- name: Create commit comment
if: steps.check.outputs.continue == 'yes'
uses: peter-evans/commit-comment@v1
with:
token: ${{ secrets.FRONTIBOTITO_GH }}
body: |
Deployment successful at https://woocommerce-proof-of-concept.vercel.app. Please, login into http://woocommerce.frontity.org/wp-admin and purge the cache.