@@ -3,23 +3,39 @@ name: Build and Deploy
3
3
on :
4
4
push :
5
5
branches :
6
- main
6
+ - " deploy"
7
+ - " master"
8
+ - " main"
9
+
10
+ # Allows you to run this workflow manually from the Actions tab
11
+ workflow_dispatch :
12
+
13
+ permissions :
14
+ contents : write
15
+ pages : write
16
+ id-token : write
17
+
18
+ # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
19
+ # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
20
+ concurrency :
21
+ group : " pages"
22
+ cancel-in-progress : false
7
23
8
24
jobs :
9
25
build :
10
- if : ${{ github.repository_owner == 'cosmicds ' }}
26
+ if : ${{ github.repository_owner == 'johnarban ' }}
11
27
runs-on : ubuntu-latest
12
28
steps :
13
29
- name : Checkout
14
30
uses : actions/checkout@v3
15
31
with :
16
32
persist-credentials : false
17
33
ref : ${{ github.event.pull_request.head.sha }}
18
-
34
+ - name : Setup Pages
35
+ uses : actions/configure-pages@v3
36
+
19
37
- name : Set up Node.js
20
38
uses : actions/setup-node@v3
21
- with :
22
- node-version : ' 18.17.1'
23
39
24
40
- name : Yarn install
25
41
run : yarn install
@@ -29,38 +45,23 @@ jobs:
29
45
30
46
- name : Build
31
47
run : yarn build
32
- env :
33
- VUE_APP_MAPBOX_ACCESS_TOKEN : ${{ secrets.MAPBOX_ACCESS_TOKEN }}
34
-
35
- # - name: BrowserStack env setup
36
- # uses: browserstack/github-actions/setup-env@master
37
- # with:
38
- # username: ${{ secrets.BROWSERSTACK_USERNAME }}
39
- # access-key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
40
-
41
- # - name: BrowserStack local tunnel setup
42
- # uses: browserstack/github-actions/setup-local@master
43
- # with:
44
- # local-testing: start
45
- # local-identifier: random
46
-
47
- # - name: Run BrowserStack tests
48
- # run: |
49
- # set -xeuo pipefail
50
- # yarn serve &
51
- # sleep 10
52
- # yarn test-bslocal -e default,firefox,edge,safari -o reports
53
-
54
- - name : Check for draft flag
55
- uses : sergeysova/jq-action@v2
56
- id : draft
48
+
49
+ - name : Upload GitHub Pages artifact
50
+ uses : actions/upload-pages-artifact@v1.0.8
57
51
with :
58
- cmd : cat package.json | jq -r '.draft // false'
52
+ path : ./dist
53
+
54
+
55
+
59
56
57
+ # Single deploy job since we're just deploying
58
+ deploy :
59
+ environment :
60
+ name : github-pages
61
+ url : ${{ steps.deployment.outputs.page_url }}
62
+ runs-on : ubuntu-latest
63
+ needs : build
64
+ steps :
60
65
- name : Deploy to GitHub Pages
61
- uses : JamesIves/github-pages-deploy-action@v4
62
- if : ${{ steps.draft.outputs.value }} == 'false'
63
- with :
64
- branch : gh-pages
65
- folder : dist
66
- ssh-key : ${{ secrets.DEPLOY_KEY }}
66
+ id : deployment
67
+ uses : actions/deploy-pages@v2
0 commit comments