-
Notifications
You must be signed in to change notification settings - Fork 49
40 lines (34 loc) · 1.1 KB
/
preview-site-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
name: Preview Site Deploy
on:
push:
branches:
- 1.x-stable
- master
workflow_dispatch:
jobs:
build:
name: 'build bundle and deploy'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14
registry-url: 'https://registry.npmjs.org'
- name: 'install and docs:build'
run: |
npm install
npm run docs:build
- name: run predeploy
id: predeploy
run: npm run predeploy
- name: Deploy 🚀 (github pages)
if: ${{ steps.predeploy.outputs.deployGithubPages == 'true' }}
uses: JamesIves/[email protected]
with:
branch: gh-pages # The branch the action should deploy to.
folder: dist/site # The folder the action should deploy.
- name: 'deploy surge'
run: |
export DEPLOY_DOMAIN=https://preview-${{ steps.predeploy.outputs.version }}-shockingsrose.surge.sh
npx surge --project ./dist/site --domain $DEPLOY_DOMAIN --token ${{ secrets.SURGE_TOKEN }}