@@ -7,10 +7,10 @@ name: Deploy Gatsby site to Pages
77on :
88 # Runs on pushes targeting the default branch
99 push :
10- branches : [" main" ]
10+ branches : [' main' ]
1111
1212 pull_request :
13- branches : [" main" ]
13+ branches : [' main' ]
1414
1515 # Allows you to run this workflow manually from the Actions tab
1616 workflow_dispatch :
@@ -24,7 +24,7 @@ permissions:
2424# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
2525# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
2626concurrency :
27- group : " pages"
27+ group : ' pages'
2828 cancel-in-progress : false
2929
3030# Default to bash
@@ -33,70 +33,8 @@ defaults:
3333 shell : bash
3434
3535jobs :
36- e2e_test :
37- runs-on : ubuntu-latest
38- steps :
39- - name : Checkout
40- uses : actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # pin@v2
41-
42- - name : Install pnpm
43- uses : pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598 # pin@v2.4.0
44- with :
45- version : latest
46-
47- - name : Setup node
48- uses : actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # pin@v3.8.1
49- with :
50- node-version : 18.16
51-
52- - name : Set pnpm cache directory
53- run : pnpm config set store-dir .pnpm-store
54- continue-on-error : true
55-
56- - name : Setup cache
57- uses : actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # pin@v2
58- with :
59- path : |
60- .pnpm-store
61- node_modules
62- /home/runner/.cache/Cypress
63- key : ${{ runner.os }}-pnpm-v1-${{ hashFiles('**/pnpm-lock.yaml') }}
64- restore-keys : |
65- ${{ runner.os }}-pnpm-v1-
66- continue-on-error : true
67-
68- - name : Install dependencies
69- run : pnpm install --frozen-lockfile --prefer-offline
70-
71- - name : Install linux deps
72- run : |
73- sudo apt-get install --no-install-recommends -y \
74- fluxbox \
75- xvfb
76-
77- - name : Run e2e tests (headful)
78- run : |
79- Xvfb :0 -screen 0 1024x768x24 -listen tcp -ac &
80- fluxbox &
81- pnpm test
82- env :
83- CYPRESS_PRIVATE_KEY_WITH_FUNDS :
84- ${{ secrets.CYPRESS_PRIVATE_KEY_WITH_FUNDS }}
85- DISPLAY : :0.0
86-
87- - name : Archive e2e artifacts
88- uses : actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # pin@v2
89- if : always()
90- with :
91- name : e2e-artifacts
92- path : |
93- tests/e2e/videos
94- tests/e2e/screenshots
95- continue-on-error : true
96-
9736 # Build job
9837 build :
99- needs : e2e_test
10038 if : ${{ github.ref == 'refs/heads/main' }}
10139 runs-on : ubuntu-latest
10240 steps :
12058 - name : Setup Node
12159 uses : actions/setup-node@v3
12260 with :
123- node-version : " 18 "
61+ node-version : ' 18 '
12462 cache : ${{ steps.detect-package-manager.outputs.manager }}
12563 - name : Setup Pages
12664 id : pages
0 commit comments