Skip to content

Commit

Permalink
fix exec
Browse files Browse the repository at this point in the history
  • Loading branch information
mistic100 committed Nov 5, 2024
1 parent 666cebb commit 30040a0
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 44 deletions.
81 changes: 42 additions & 39 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,32 @@ on:
workflow_dispatch: {}

jobs:
build:
runs-on: ubuntu-latest
# build:
# runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
# steps:
# - uses: actions/checkout@v4

- name: setup
uses: ./.github/workflows/shared/setup
# - name: setup
# uses: ./.github/workflows/shared/setup

- name: build
run: yarn ci:build
# - name: build
# run: yarn ci:build

- name: test summary
uses: phoenix-actions/test-reporting@v15
if: ${{ !cancelled() }}
with:
name: build
output-to: step-summary
path: 'packages/*/reports/mocha.json'
reporter: mocha-json
# - name: test summary
# uses: phoenix-actions/test-reporting@v15
# if: ${{ !cancelled() }}
# with:
# name: build
# output-to: step-summary
# path: 'packages/*/reports/mocha.json'
# reporter: mocha-json

e2e:
if: ${{ !startsWith(github.head_ref, 'dependabot') }}

runs-on: ubuntu-latest
needs: build
# needs: build

steps:
- uses: actions/checkout@v4
Expand All @@ -62,26 +62,29 @@ jobs:
- name: deploy report
uses: ./.github/workflows/shared/deploy-e2e-report
if: ${{ !cancelled() && github.repository == 'mistic100/Photo-Sphere-Viewer' && github.event_name != 'pull_request' }}

build-doc:
runs-on: ubuntu-latest
needs: build

steps:
- uses: actions/checkout@v4

- uses: dorny/paths-filter@v3
id: changes
with:
filters: |
docs:
- 'docs/**'
- 'package.json'
- if: steps.changes.outputs.docs == 'true'
name: setup
uses: ./.github/workflows/shared/setup

- if: steps.changes.outputs.docs == 'true'
name: build-doc
run: yarn ci:build-doc
netlify-auth-token: ${{ secrets.NETLIFY_AUTH_TOKEN }}
netlify-site-id: ${{ secrets.NETLIFY_REPORTS_SITE_ID }}

# build-doc:
# runs-on: ubuntu-latest
# needs: build

# steps:
# - uses: actions/checkout@v4

# - uses: dorny/paths-filter@v3
# id: changes
# with:
# filters: |
# docs:
# - 'docs/**'
# - 'package.json'

# - if: steps.changes.outputs.docs == 'true'
# name: setup
# uses: ./.github/workflows/shared/setup

# - if: steps.changes.outputs.docs == 'true'
# name: build-doc
# run: yarn ci:build-doc
12 changes: 8 additions & 4 deletions .github/workflows/shared/deploy-e2e-report/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
name: deploy-e2e-report

inputs:
netlify-auth-token:
required: true
netlify-site-id:
required: true

runs:
using: composite

Expand All @@ -9,21 +15,19 @@ runs:
id: deployment
with:
step: start
token: ${{ secrets.GITHUB_TOKEN }}
env: cypress

- name: deploy
shell: bash
run: node ./build/deploy-netlify.mjs --rootFolder=cypress/reports/html --exclude=.jsons --branch=${{ github.ref_name }}
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_REPORTS_SITE_ID }}
NETLIFY_AUTH_TOKEN: ${{ inputs.netlify-auth-token }}
NETLIFY_SITE_ID: ${{ inputs.netlify-site-id }}

- name: finish deploy
uses: bobheadxi/deployments@v1
with:
step: finish
token: ${{ secrets.GITHUB_TOKEN }}
status: success
env: ${{ steps.deployment.outputs.env }}
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/shared/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: setup

inputs:
turbo-cache:
default: True
default: true

runs:
using: composite
Expand Down

0 comments on commit 30040a0

Please sign in to comment.