Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 97879d8

Browse files
committedDec 19, 2024·
fix workflow
1 parent 972449e commit 97879d8

File tree

1 file changed

+38
-37
lines changed

1 file changed

+38
-37
lines changed
 

‎.github/workflows/build-deploy.yml

+38-37
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,39 @@ name: Build and Deploy
33
on:
44
push:
55
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
723

824
jobs:
925
build:
10-
if: ${{ github.repository_owner == 'cosmicds' }}
26+
if: ${{ github.repository_owner == 'johnarban' }}
1127
runs-on: ubuntu-latest
1228
steps:
1329
- name: Checkout
1430
uses: actions/checkout@v3
1531
with:
1632
persist-credentials: false
1733
ref: ${{ github.event.pull_request.head.sha }}
18-
34+
- name: Setup Pages
35+
uses: actions/configure-pages@v3
36+
1937
- name: Set up Node.js
2038
uses: actions/setup-node@v3
21-
with:
22-
node-version: '18.17.1'
2339

2440
- name: Yarn install
2541
run: yarn install
@@ -29,38 +45,23 @@ jobs:
2945

3046
- name: Build
3147
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
5751
with:
58-
cmd: cat package.json | jq -r '.draft // false'
52+
path: ./dist
53+
54+
55+
5956

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:
6065
- 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

Comments
 (0)
Please sign in to comment.